summaryrefslogtreecommitdiff
path: root/t/op/gv.t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-03-06 13:27:43 +0000
committerNicholas Clark <nick@ccl4.org>2011-03-06 13:27:43 +0000
commit34770c8cd8a73ef611921faebd85df87219773ee (patch)
tree0ecaa3aa3273935f2777fae78b0d8339828728ab /t/op/gv.t
parent4596752b8da44c630264e094a6e4a95082f0b07a (diff)
downloadperl-34770c8cd8a73ef611921faebd85df87219773ee.tar.gz
In gv.t, check that the installed $SIG{__DIE__} handler is never called.
98e007d4a6d559b3 missed adding a check that the first $SIG{__DIE__} handler was never called. While tidying, make the second $e lexical, and check that the second $SIG{__DIE__} handler remains uncalled at the end of its block.
Diffstat (limited to 't/op/gv.t')
-rw-r--r--t/op/gv.t8
1 files changed, 5 insertions, 3 deletions
diff --git a/t/op/gv.t b/t/op/gv.t
index 765be7e445..f796232134 100644
--- a/t/op/gv.t
+++ b/t/op/gv.t
@@ -12,7 +12,7 @@ BEGIN {
use warnings;
-plan( tests => 232 );
+plan( tests => 234 );
# type coersion on assignment
$foo = 'foo';
@@ -288,10 +288,11 @@ is($j[0], 1);
is (ref\$v{v}, 'GLOB', 'lvalue assignment preserves globs');
my $x = readline $v{v};
is ($x, "perl\n");
+ is ($e, '', '__DIE__ handler never called');
}
{
- $e = '';
+ my $e = '';
# GLOB assignment to tied element
local $SIG{__DIE__} = sub { $e = $_[0] };
sub T::TIEARRAY { bless [] => "T" }
@@ -305,9 +306,10 @@ is($j[0], 1);
ref\tied(@ary)->[0], 'GLOB',
'tied elem assignment preserves globs'
);
- is ($e, '');
+ is ($e, '', '__DIE__ handler not called');
my $x = readline $ary[0];
is($x, "rocks\n");
+ is ($e, '', '__DIE__ handler never called');
}
{