X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcgibin.t;h=4a3e84c65fcd9ebc7c83a8ef87fe61502aaaad30;hb=06d193b4efcebbba330cfbf65dca5916005b9130;hp=0a89f26932d949cec2abef35a2ad15c5722d0f2a;hpb=bdb359953cd3ab98eaa9b567cc09955a795c8dd5;p=catagits%2FCatalyst-Controller-WrapCGI.git diff --git a/t/cgibin.t b/t/cgibin.t index 0a89f26..4a3e84c 100644 --- a/t/cgibin.t +++ b/t/cgibin.t @@ -6,7 +6,7 @@ use warnings; use FindBin '$Bin'; use lib "$Bin/lib"; -use Test::More tests => 6; +use Test::More tests => 9; use Catalyst::Test 'TestCGIBin'; use HTTP::Request::Common; @@ -21,6 +21,11 @@ my $response = request POST '/my-bin/path/test.pl', [ is($response->content, 'foo:bar bar:baz', 'POST to Perl CGI File'); +$response = request '/my-bin/path/test.pl?foo=bar&bar=baz'; + +is($response->content, 'foo:bar bar:baz', + 'Perl CGI File invoked with query params'); + $response = request POST '/my-bin/exit.pl', [ name => 'world', ]; @@ -50,6 +55,14 @@ $response = request POST '/cgihandler/mtfnpy', [ is($response->content, 'foo:bar bar:baz', 'POST to Perl CGI File through a forward via cgi_action'); +$response = request '/my-bin/path/testdata.pl'; +is($response->content, "testing\n", + 'scripts with __DATA__ sections work'); + +$response = request '/my-bin/pathinfo.pl/path/info'; +is($response->content, '/path/info', + 'PATH_INFO works'); + SKIP: { skip "Can't run shell scripts on non-*nix", 1 if $^O eq 'MSWin32' || $^O eq 'VMS';