X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Controller-WrapCGI.git;a=blobdiff_plain;f=t%2Fwrap-cgi.t;h=aa253cf73e2b9aa2549987e905c38c778c212721;hp=2477c7d058a62694f6740397aeb7b1d5092ab788;hb=f410f043b41cc59d08cb1aa015378888c8fe88b7;hpb=f07403fe54b0b8d92f80bd33c8ac9891d325f80a diff --git a/t/wrap-cgi.t b/t/wrap-cgi.t index 2477c7d..aa253cf 100644 --- a/t/wrap-cgi.t +++ b/t/wrap-cgi.t @@ -6,7 +6,7 @@ use warnings; use FindBin '$Bin'; use lib "$Bin/lib"; -use Test::More tests => 2; +use Test::More tests => 4; use Catalyst::Test 'TestApp'; use HTTP::Request::Common; @@ -18,6 +18,13 @@ my $response = request POST '/cgi-bin/test.cgi', [ is($response->content, 'foo:bar bar:baz', 'POST to CGI'); -$response = request '/cgi-bin/test_pathinfo.cgi/path/info'; +$response = request '/cgi-bin/test_pathinfo.cgi/path/%2Finfo'; +is($response->content, '/path//info', 'PATH_INFO is correct'); -is($response->content, '/path/info', 'PATH_INFO is correct'); +$response = request '/cgi-bin/test_filepathinfo.cgi/path/%2Finfo'; +is($response->content, '/test_filepath_info/path//info', + 'FILEPATH_INFO is correct (maybe)'); + +$response = request '/cgi-bin/test_scriptname.cgi/foo/bar'; +is($response->content, '/cgi-bin/test_scriptname.cgi', + 'SCRIPT_NAME is correct');