Debug information: syntax error at $testfile line 2, at EOF
- (Might be a runaway multi-line \cq\cq string starting on line 1)
+Debug information: $SYNTAXERR
|
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" ($!)};
+
+my $VOIDWARN = getwarning('42', 2, $testfile);
+
plp_is('warnings', split /\n\n/, <
-2
-<: 42 :>
-3
-<: warn "warning" :>
-4
-<: include "missinginclude" :>
-5
-<(missinginclude)>
+1<: use warnings :>
+2<: 42 :>
+3<: warn "warning" :>
+4<: include "missinginclude" :>
+5<(missinginclude)>
6
$HEAD
-Useless use of a constant in void context at $testfile line 4.
+${VOIDWARN}
1
-
2
+3warning at $testfile line 3.
-3
-warning at $testfile line 6.
-
-4
-Debug information: Can't open "$base/missinginclude" (No such file or directory) at $testfile line 8.
+4Debug information: $INCWARN at $testfile line 4.
|
-5
-Debug information: Can't open "$base/missinginclude" (No such file or directory) at $testfile line 10.
+5Debug information: $INCWARN at $testfile line 5.
|
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
-#TODO: 403
-
plp_is('$PLP::DEBUG',
- '<: $PLP::DEBUG = 2 :>1<(missinginclude)>2',
- "Content-Type: text/plain\n\n$HEAD\n1"
+ '<: $PLP::DEBUG = 2; delete $header{x_plp_version} :>1<(missinginclude)>2',
+ "Content-Type: text/plain\n\nContent-Type: text/html\n\n1"
);
+}
+
plp_is('utf8', '<: use open qw/:std :utf8/; print chr 191', <PLP: Can't read: $base/$testfile (/$testfile/test/123)
+Content-Type: text/html
+Status: 403
+
+
+
+403 Forbidden
+
+Forbidden
+You don't have permission to access /$testfile/test/123 on this server.
+
+ |
|
|