Skip to content

Commit

Permalink
Deparse.t tweak
Browse files Browse the repository at this point in the history
The revert two commits ago causes B::Deparse to go through a different
code path when dumping the constant.  Ideally the output should be the
same either way (i.e., consistently with or without a semicolon, not
sometimes one way and sometimes the other).  But for now, just make
the test more lenient.
  • Loading branch information
Father Chrysostomos committed Oct 20, 2017
1 parent 834e1dc commit 6fbf0c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/B/Deparse.t
Expand Up @@ -162,7 +162,7 @@ $a = readpipe qq|$^X $path "-MO=Deparse"|
.qq| -e "#line 123 four-five-six"|
.qq| -e "package G; sub g(){0} sub s{}" 2>&1|;
$a =~ s/-e syntax OK\n//g;
like($a, qr/sub F::f \(\) \{\s*0;\s*}/,
like($a, qr/sub F::f \(\) \{\s*0;?\s*}/,
"Constant is dumped in package in which other subs are dumped");
unlike($a, qr/sub g/,
"Constant is not dumped in package in which other subs are not dumped");
Expand Down

0 comments on commit 6fbf0c3

Please sign in to comment.