X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcgibin.t;h=0e8179d68378cc23c342b5e01f2660bfa33967b6;hb=6c725e0b97ac472fd657ee11e39a824863405695;hp=ce36f1b7ee4b3d1f59b043ac0993d6e60c0b1b1a;hpb=8cf93f587f255563dcff3495bab2b760a6182c29;p=catagits%2FCatalyst-Controller-WrapCGI.git diff --git a/t/cgibin.t b/t/cgibin.t index ce36f1b..0e8179d 100644 --- a/t/cgibin.t +++ b/t/cgibin.t @@ -49,6 +49,10 @@ $response = request POST '/my-bin/exit.pl', [ is($response->code, 500, 'POST to Perl CGI with nonzero exit()'); +$response = request '/my-bin/ignored.cgi'; + +is($response->code, 500, "file not matching 'cgi_file_pattern' is ignored"); + $response = request POST '/cgihandler/mtfnpy', [ foo => 'bar', bar => 'baz' @@ -58,7 +62,7 @@ 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", +like($response->content, qr/^testing\r?\n\z/, 'scripts with __DATA__ sections work'); $response = request '/my-bin/pathinfo.pl/path/info'; @@ -83,4 +87,10 @@ SKIP: { is $response->code, 500, 'Non-Perl CGI with non-zero exit dies'; } +{ $response = get('/my-bin/time.pl'); + sleep 1; + my $response_2 = get('/my-bin/time.pl'); + isnt( $response, $response_2, 'cgis are getting invoked each time' ); +} + done_testing;