summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJohn Karr <brainbuz@brainbuz.org>2020-11-10 17:14:24 -0500
committerTony Cook <tony@develop-help.com>2020-11-24 10:28:39 +1100
commit4281700a59b8da499ae9f1980d60c7e958a6583d (patch)
tree6cf15225b457e255448314cf9119abb571c4a88f /t
parentfccc9f3e92f31c2c2beb8c4e49977ea4bdebc6ff (diff)
downloadperl-4281700a59b8da499ae9f1980d60c7e958a6583d.tar.gz
comp/parser.t count two lines that were being tested to see if they crashed
parser as tests (PASS if the test file is still running after the lines).
Diffstat (limited to 't')
-rw-r--r--t/comp/parser.t16
1 files changed, 9 insertions, 7 deletions
diff --git a/t/comp/parser.t b/t/comp/parser.t
index 79b930ecb8..c928db6cfc 100644
--- a/t/comp/parser.t
+++ b/t/comp/parser.t
@@ -8,7 +8,7 @@ BEGIN {
chdir 't' if -d 't';
}
-print "1..188\n";
+print "1..190\n";
sub failed {
my ($got, $expected, $name) = @_;
@@ -513,16 +513,18 @@ is $@, "Illegal division by zero at maggapom line 2.\n",
is +(${[{a=>214}]}[0])->{a}, 214, '($array[...])->{...}';
# This used to fail an assertion because of the OPf_SPECIAL flag on an
-# OP_GV that started out as an OP_CONST. No test output is necessary, as
-# successful parsing is sufficient.
-sub FILE1 () { 1 }
-sub dummy { tell FILE1 }
+# OP_GV that started out as an OP_CONST.
+
+ sub FILE1 () { 1 }
+ sub dummy { tell FILE1 }
# More potential multideref assertion failures
# OPf_PARENS on OP_RV2SV in subscript
-$x[($_)];
+ $x[($_)];
+ is(1,1, "PASS: Previous line successfully parsed. OPf_PARENS on OP_RV2SV");
# OPf_SPECIAL on OP_GV in subscript
-$x[FILE1->[0]];
+ $x[FILE1->[0]];
+ is(1,1, "PASS: Previous line successfully parsed. OPf_SPECIAL on OP_GV");
# Used to crash [perl #123542]
eval 's /${<>{}) //';