9 use Test::More tests => 8;
11 use Catalyst::Test 'TestCGIBin';
12 use HTTP::Request::Common;
14 # this should be ignored
15 $ENV{MOD_PERL} = "mod_perl/2.0";
17 my $response = request POST '/my-bin/path/test.pl', [
22 is($response->content, 'foo:bar bar:baz', 'POST to Perl CGI File');
24 $response = request POST '/my-bin/exit.pl', [
28 is($response->content, 'hello world', 'POST to Perl CGI with exit()');
30 $response = request POST '/my-bin/exit.pl', [
35 is($response->code, 500, 'POST to Perl CGI with nonzero exit()');
37 $response = request POST '/cgihandler/dongs', [
42 is($response->content, 'foo:bar bar:baz',
43 'POST to Perl CGI File through a forward');
45 $response = request POST '/cgihandler/mtfnpy', [
50 is($response->content, 'foo:bar bar:baz',
51 'POST to Perl CGI File through a forward via cgi_action');
53 $response = request '/my-bin/path/testdata.pl';
54 is($response->content, "testing\n",
55 'scripts with __DATA__ sections work');
57 $response = request '/my-bin/pathinfo.pl/path/info';
58 is($response->content, '/path/info',
62 skip "Can't run shell scripts on non-*nix", 1
63 if $^O eq 'MSWin32' || $^O eq 'VMS';
65 is(get('/my-bin/test.sh'), "Hello!\n", 'Non-Perl CGI File');