Debian lenny version packages
[pkg-perl] / deb-src / libtest-simple-perl / libtest-simple-perl-0.80 / t / lib / Test / Simple / sample_tests / death_with_handler.plx
1 require Test::Simple;
2
3 push @INC, 't/lib';
4 require Test::Simple::Catch;
5 my($out, $err) = Test::Simple::Catch::caught();
6
7 Test::Simple->import(tests => 2);
8
9 # Test we still get the right exit code despite having a die
10 # handler.
11 $SIG{__DIE__} = sub {};
12
13 require Dev::Null;
14 tie *STDERR, 'Dev::Null';
15
16 ok(1);
17 ok(1);
18 die "This is a test";