This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "Update Test-Simple to CPAN version 1.001009"
[perl5.git] / cpan / Test-Simple / t / Legacy / dont_overwrite_die_handler.t
1 #!/usr/bin/perl -w
2 use Config; # To prevent conflict with some strawberry-portable versions
3
4 BEGIN {
5     if( $ENV{PERL_CORE} ) {
6         chdir 't';
7         @INC = '../lib';
8     }
9 }
10
11 # Make sure this is in place before Test::More is loaded.
12 my $handler_called;
13 BEGIN {
14     $SIG{__DIE__} = sub { $handler_called++ };
15 }
16
17 use Test::More tests => 2;
18
19 $handler_called = 0;
20 ok !eval { die };
21 is $handler_called, 1, 'existing DIE handler not overridden';