Skip to content

Commit

Permalink
Probe for $SIG{__DIE__} localization in testing
Browse files Browse the repository at this point in the history
  • Loading branch information
xdg committed Jul 21, 2018
1 parent fefa219 commit a5da679
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions t/sig_die.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ use Path::Tiny;

use lib 't/fakelib';

# probe for working $SIG{__DIE__} localization
my $called;
{
local $SIG{__DIE__} = sub { $called++ };
{
local $SIG{__DIE__};
eval { die };
}
}
plan skip_all => "\$SIG{__DIE__} won't localize"
if $called;

my $file = path( scalar tmpnam() );
ok $file, 'Got a filename via tmpnam()';

Expand Down

0 comments on commit a5da679

Please sign in to comment.