X-Git-Url: http://git.shiar.nl/perl/plp/.git/blobdiff_plain/04fbdaaff4a08de8acd15542c2a3c4e1a8084039..9cd28a89456f57a491c83600b95f6dd0840e7ec1:/t/50-cgi.t diff --git a/t/50-cgi.t b/t/50-cgi.t index cd10ee4..0de6940 100644 --- a/t/50-cgi.t +++ b/t/50-cgi.t @@ -106,6 +106,15 @@ $HEAD TEST +SKIP: { + +my $INCFILE = File::Spec->rel2abs("$base/missinginclude"); +if (open my $dummy, "<", $INCFILE) { # like PLP::source will + fail("file missinginclude shouldn't exist"); + skip("missinginclude tests", 2); +} +my $INCWARN = qq{Can't open "$INCFILE" ($!)}; + plp_is('warnings', split /\n\n/, < @@ -129,16 +138,16 @@ Useless use of a constant in void context at $testfile line 4. warning at $testfile line 6. 4 -
Debug information:
Can't open "$base/missinginclude" (No such file or directory) at $testfile line 8. +
Debug information:
$INCWARN at $testfile line 8.
5 -
Debug information:
Can't open "$base/missinginclude" (No such file or directory) at $testfile line 10. +
Debug information:
$INCWARN at $testfile line 10.
TEST plp_is('$PLP::ERROR', '<: $PLP::ERROR = sub {print "Oh no: $_[0]"} :> <(missinginclude)>.', - qq{$HEAD\n Oh no: Can't open "$base/missinginclude" (No such file or directory) at $testfile line 1.\n\n} + qq{$HEAD\n Oh no: $INCWARN at $testfile line 1.\n\n} ); #TODO: 404 @@ -149,6 +158,8 @@ plp_is('$PLP::DEBUG', "Content-Type: text/plain\n\nContent-Type: text/html\n\n1" ); +} + plp_is('utf8', '<: use open qw/:std :utf8/; print chr 191', <