summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorBram <perl-rt@wizbit.be>2008-08-05 21:58:00 +0200
committerH.Merijn Brand <h.m.brand@xs4all.nl>2008-08-06 09:58:19 +0000
commitfcf99ed44dc650ba48499b5fd6e385a04afd0979 (patch)
tree89ac29807a962d8b7486c1859186533b5315272a /t
parentf9a01fbf80a2dfff95a408098b4f01fe2a12e140 (diff)
downloadperl-fcf99ed44dc650ba48499b5fd6e385a04afd0979.tar.gz
Tests for [perl #57564] and [perl #24524] Refcounting bug
Message-ID: <20080805195800.xq9k9kttwk0kwsk0@horde.wizbit.be> p4raw-id: //depot/perl@34171
Diffstat (limited to 't')
-rwxr-xr-xt/op/ref.t14
1 files changed, 13 insertions, 1 deletions
diff --git a/t/op/ref.t b/t/op/ref.t
index e3d66dc1c2..9ef7b7adfc 100755
--- a/t/op/ref.t
+++ b/t/op/ref.t
@@ -8,7 +8,7 @@ BEGIN {
require 'test.pl';
use strict qw(refs subs);
-plan(182);
+plan(189);
# Test glob operations.
@@ -584,6 +584,18 @@ ok (!eval { %$pvbm }, 'PVBM is not a HASH ref');
ok (!eval { $pvbm->() }, 'PVBM is not a CODE ref');
ok (!eval { $rpvbm->foo }, 'PVBM is not an object');
+# bug 24254
+is( runperl(stderr => 1, prog => 'map eval qq(exit),1 for 1'), "");
+is( runperl(stderr => 1, prog => 'eval { for (1) { map { die } 2 } };'), "");
+is( runperl(stderr => 1, prog => 'for (125) { map { exit } (213)}'), "");
+is( runperl(stderr => 1, prog => 'map die,4 for 3'), "Died at -e line 1.\n");
+is( runperl(stderr => 1, prog => 'grep die,4 for 3'), "Died at -e line 1.\n");
+is( runperl(stderr => 1, prog => 'for $a (3) {@b=sort {die} 4,5}'), "Died at -e line 1.\n");
+
+# bug 57564
+is( runperl(stderr => 1, prog => 'my $i;for $i (1) { for $i (2) { } }'), "");
+
+
# Bit of a hack to make test.pl happy. There are 3 more tests after it leaves.
$test = curr_test();
curr_test($test + 3);