Change 34171 by [EMAIL PROTECTED] on 2008/08/06 09:58:19

        Subject: [PATCH] Tests for [perl #57564] and [perl #24524] Refcounting 
bug
        From: Bram <[EMAIL PROTECTED]>
        Date: Tue, 05 Aug 2008 19:58:00 +0200
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/t/op/ref.t#37 edit

Differences ...

==== //depot/perl/t/op/ref.t#37 (xtext) ====
Index: perl/t/op/ref.t
--- perl/t/op/ref.t#36~34092~   2008-06-28 14:06:57.000000000 -0700
+++ perl/t/op/ref.t     2008-08-06 02:58:19.000000000 -0700
@@ -8,7 +8,7 @@
 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 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) [EMAIL PROTECTED] {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);
End of Patch.

Reply via email to