diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-11-18 11:09:47 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-11-18 11:09:47 +0000 |
commit | 606f8fc8222f5bd75c0a46b2d82c7f0f0800f301 (patch) | |
tree | ee7fc114a26744e4ddd1410f92db9f9f1f31b902 /t | |
parent | 27382b8e6a962ca9892f6b2cc051439368e18043 (diff) | |
download | perl-606f8fc8222f5bd75c0a46b2d82c7f0f0800f301.tar.gz |
Rafael noticed a bug in 34873 - I was comparing against the wrong
variable, and hence (usually) saving all globs, not just those that
should be kept.
p4raw-id: //depot/perl@34879
Diffstat (limited to 't')
-rw-r--r-- | t/comp/retainedlines.t | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/t/comp/retainedlines.t b/t/comp/retainedlines.t index aa044ad84e..41c279e62b 100644 --- a/t/comp/retainedlines.t +++ b/t/comp/retainedlines.t @@ -10,7 +10,9 @@ BEGIN { use strict; -plan( tests => 19 ); +plan (tests => 21); + +$^P = 0xA; my @before = grep { /eval/ } keys %::; @@ -20,7 +22,6 @@ my %seen; my $name = 'foo'; for my $sep (' ', "\0") { - $^P = 0xA; my $prog = "sub $name { 'Perl${sep}Rules' @@ -46,3 +47,11 @@ for my $sep (' ', "\0") { $seen{$keys[0]}++; $name++; } + +is (eval '1 + 1', 2, 'String eval works'); + +my @after = grep { /eval/ } keys %::; + +is (@after, 0 + keys %seen, + "evals that don't define subroutines are correctly cleaned up"); + |