Unfuck that as well
[catagits/Catalyst-Runtime.git] / t / aggregate / unit_core_script_fastcgi.t
index 534b319..6ffee95 100644 (file)
@@ -22,9 +22,10 @@ testOption( [ qw/-l 127.0.0.1:3000/ ], ['127.0.0.1:3000', opthash()] );
 testOption( [ qw/-d/ ], [undef, opthash()] );
 testOption( [ qw/--daemon/ ], [undef, opthash()] );
 
-# pidfile        -pidfile                  --pid --pidfile
+# pidfile        -pidfile -p                 --pid --pidfile
 testOption( [ qw/--pidfile cat.pid/ ], [undef, opthash(pidfile => 'cat.pid')] );
 testOption( [ qw/--pid cat.pid/ ], [undef, opthash(pidfile => 'cat.pid')] );
+testOption( [ qw/-p cat.pid/ ], [undef, opthash(pidfile => 'cat.pid')] );
 
 # manager
 testOption( [ qw/--manager foo::bar/ ], [undef, opthash(manager => 'foo::bar')] );
@@ -47,19 +48,14 @@ done_testing;
 sub testOption {
     my ($argstring, $resultarray) = @_;
 
-    subtest "Test for ARGV: @$argstring" => sub
-        {
-            plan tests => 2;
-            local @ARGV = @$argstring;
-            local @TestAppToTestScripts::RUN_ARGS;
-            lives_ok {
-                Catalyst::Script::FastCGI->new_with_options(application_name => 'TestAppToTestScripts')->run;
-            } "new_with_options";
-            # First element of RUN_ARGS will be the script name, which we don't care about
-            shift @TestAppToTestScripts::RUN_ARGS;
-            is_deeply \@TestAppToTestScripts::RUN_ARGS, $resultarray, "is_deeply comparison";
-            done_testing;
-        };
+    local @ARGV = @$argstring;
+    local @TestAppToTestScripts::RUN_ARGS;
+    lives_ok {
+        Catalyst::Script::FastCGI->new_with_options(application_name => 'TestAppToTestScripts')->run;
+    } "new_with_options";
+    # First element of RUN_ARGS will be the script name, which we don't care about
+    shift @TestAppToTestScripts::RUN_ARGS;
+    is_deeply \@TestAppToTestScripts::RUN_ARGS, $resultarray, "is_deeply comparison";
 }
 
 # Returns the hash expected when no flags are passed