testOption( [ qw/--nproc 6/ ], [undef, opthash(nproc => 6)] );
testOption( [ qw/--n 6/ ], [undef, opthash(nproc => 6)] );
-# title
-testOption( [ qw/--title foo/ ], [undef, opthash(title => 'foo')] );
-testOption( [ qw/-t foo/ ], [undef, opthash(title => 'foo')] );
+# proc_title
+testOption( [ qw/--proc_title foo/ ], [undef, opthash(proc_title => 'foo')] );
done_testing;
} "new_with_options";
# First element of RUN_ARGS will be the script name, which we don't care about
shift @TestAppToTestScripts::RUN_ARGS;
+ my $server = pop @TestAppToTestScripts::RUN_ARGS;
+ like ref($server), qr/^Plack::Handler/, 'Is a Plack::Handler';
is_deeply \@TestAppToTestScripts::RUN_ARGS, $resultarray, "is_deeply comparison";
}
# Returns the hash expected when no flags are passed
sub opthash {
return {
- pidfile => undef,
- keep_stderr => undef,
- detach => undef,
- nproc => undef,
- manager => undef,
- title => undef,
+ (map { ($_ => undef) } qw(pidfile keep_stderr detach nproc manager)),
+ proc_title => 'perl-fcgi-pm [TestAppToTestScripts]',
@_,
};
}