Skip to content

Commit 4281700

Browse files
brainbuztonycoz
authored andcommitted
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).
1 parent fccc9f3 commit 4281700

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

t/comp/parser.t

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ BEGIN {
88
chdir 't' if -d 't';
99
}
1010

11-
print "1..188\n";
11+
print "1..190\n";
1212

1313
sub failed {
1414
my ($got, $expected, $name) = @_;
@@ -513,16 +513,18 @@ is $@, "Illegal division by zero at maggapom line 2.\n",
513513
is +(${[{a=>214}]}[0])->{a}, 214, '($array[...])->{...}';
514514
515515
# This used to fail an assertion because of the OPf_SPECIAL flag on an
516-
# OP_GV that started out as an OP_CONST. No test output is necessary, as
517-
# successful parsing is sufficient.
518-
sub FILE1 () { 1 }
519-
sub dummy { tell FILE1 }
516+
# OP_GV that started out as an OP_CONST.
517+
518+
sub FILE1 () { 1 }
519+
sub dummy { tell FILE1 }
520520
521521
# More potential multideref assertion failures
522522
# OPf_PARENS on OP_RV2SV in subscript
523-
$x[($_)];
523+
$x[($_)];
524+
is(1,1, "PASS: Previous line successfully parsed. OPf_PARENS on OP_RV2SV");
524525
# OPf_SPECIAL on OP_GV in subscript
525-
$x[FILE1->[0]];
526+
$x[FILE1->[0]];
527+
is(1,1, "PASS: Previous line successfully parsed. OPf_SPECIAL on OP_GV");
526528
527529
# Used to crash [perl #123542]
528530
eval 's /${<>{}) //';

0 commit comments

Comments
 (0)