diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-11-03 18:53:52 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-11-04 22:45:33 -0800 |
commit | 47c8e7fe4dafea45e2640fb1b39714077bda8085 (patch) | |
tree | a3c5f2b03bcfbb663c2c97c5878f68a04ee49789 /t | |
parent | 484e61088c41ed37ff05a1038f16c67b3c4b3323 (diff) | |
download | perl-47c8e7fe4dafea45e2640fb1b39714077bda8085.tar.gz |
svleak.t: Enable syntax error tests under -Dmad
Also use the fairly new eleak for brevity’s sake (and also because it
knows about the existing mad leak for string evals).
Diffstat (limited to 't')
-rw-r--r-- | t/op/svleak.t | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/t/op/svleak.t b/t/op/svleak.t index 83e72c348e..ee646d7c8b 100644 --- a/t/op/svleak.t +++ b/t/op/svleak.t @@ -184,19 +184,17 @@ SKIP: { leak(2, 0, sub { eval q{ my $x = "x"; "abc" =~ /$x/ for 1..5 } }, '#114356'); } -SKIP: { - skip "disabled under -Dmad (eval leaks)", 6 if $Config{mad}; - leak(2, 0, sub { eval '"${<<END}" - ' }, 'unterminated here-doc in quotes in multiline eval'); - leak(2, 0, sub { eval '"${<<END - }"' }, 'unterminated here-doc in multiline quotes in eval'); - leak(2, 0, sub { eval { do './op/svleak.pl' } }, +# Syntax errors +eleak(2, 0, '"${<<END}" + ', 'unterminated here-doc in quotes in multiline eval'); +eleak(2, 0, '"${<<END + }"', 'unterminated here-doc in multiline quotes in eval'); +leak(2, !!$Config{mad}, sub { eval { do './op/svleak.pl' } }, 'unterminated here-doc in file'); - leak(2, 0, sub { eval 'tr/9-0//' }, 'tr/9-0//'); - leak(2, 0, sub { eval 'tr/a-z-0//' }, 'tr/a-z-0//'); - leak(2, 0, sub { eval 'no warnings; nonexistent_function 33838' }, +eleak(2, 0, 'tr/9-0//'); +eleak(2, 0, 'tr/a-z-0//'); +eleak(2, 0, 'no warnings; nonexistent_function 33838', 'bareword followed by number'); -} # [perl #114764] Attributes leak scalars leak(2, 0, sub { eval 'my $x : shared' }, 'my $x :shared used to leak'); |