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
@@ -115,33 +156,25 @@ if (open my $dummy, "<", $INCFILE) { # like PLP::source will
}
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: $INCWARN at $testfile line 8.
+4Debug information: $INCWARN at $testfile line 4.
|
-5
-Debug information: $INCWARN at $testfile line 10.
+5Debug information: $INCWARN at $testfile line 5.
|
TEST
@@ -150,9 +183,6 @@ plp_is('$PLP::ERROR',
qq{$HEAD\n Oh no: $INCWARN at $testfile line 1.\n\n}
);
-#TODO: 404
-#TODO: 403
-
plp_is('$PLP::DEBUG',
'<: $PLP::DEBUG = 2; delete $header{x_plp_version} :>1<(missinginclude)>2',
"Content-Type: text/plain\n\nContent-Type: text/html\n\n1"
@@ -174,6 +204,41 @@ my @envtest = (
plp_is('%ENV (on apache)', @envtest);
+SKIP: {
+chmod 0244, $testfile or skip("changed permissions", 1);
+plp_is('permission denied', undef, <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.
+
+ |
|
|