This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
svleak.t: re-evals leak under mad
authorFather Chrysostomos <sprout@cpan.org>
Sat, 3 Nov 2012 16:28:54 +0000 (09:28 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 5 Nov 2012 06:45:31 +0000 (22:45 -0800)
t/op/svleak.t

index b3e2700..319866f 100644 (file)
@@ -307,12 +307,13 @@ leak(2, 0, sub {
 # Run-time regexp code blocks
 {
     use re 'eval';
+    my $madness = !!$Config{mad};
     my @tests = ('[(?{})]','(?{})');
     for my $t (@tests) {
-       leak(2, 0, sub {
+       leak(2, $madness, sub {
            / $t/;
        }, "/ \$x/ where \$x is $t does not leak");
-       leak(2, 0, sub {
+       leak(2, $madness, sub {
            /(?{})$t/;
        }, "/(?{})\$x/ where \$x is $t does not leak");
     }