support CRLF in tests
[catagits/Catalyst-Controller-WrapCGI.git] / t / cgibin.t
index e1798ec..0e8179d 100644 (file)
@@ -62,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';
@@ -87,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;