summaryrefslogtreecommitdiff
path: root/lib/sigtrap.t
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sigtrap.t')
-rw-r--r--lib/sigtrap.t4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sigtrap.t b/lib/sigtrap.t
index 13775f7f51..7e8ddef66d 100644
--- a/lib/sigtrap.t
+++ b/lib/sigtrap.t
@@ -61,8 +61,10 @@ my $out = tie *STDOUT, 'TieOut';
$SIG{FAKE} = 'DEFAULT';
$sigtrap::Verbose = 1;
sigtrap->import('any', 'FAKE');
+my $read = $out->read;
+untie *STDOUT;
is( $SIG{FAKE}, \&sigtrap::handler_traceback, 'should set default handler' );
-like( $out->read, qr/^Installing handler/, 'does it talk with $Verbose set?' );
+like( $read, qr/^Installing handler/, 'does it talk with $Verbose set?' );
# handler_die croaks with first argument
eval { sigtrap::handler_die('FAKE') };