« t/lib/Test/Simple/sample_tests/death_in_eval.plx
↑ Summary
t/lib/Test/Simple/sample_tests/exit.plx »
| 1 | 1 | require Test::Simple; | |
| 2 | |||
| 3 | 1 | push @INC, 't/lib'; | |
| 4 | 1 | require Test::Simple::Catch; | |
| 5 | 1 | my($out, $err) = Test::Simple::Catch::caught(); | |
| 6 | |||
| 7 | 1 | Test::Simple->import(tests => 2); | |
| 8 | |||
| 9 | # Test we still get the right exit code despite having a die | ||
| 10 | # handler. | ||
| 11 | 1 | ▶ | $SIG{__DIE__} = sub {}; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | 1 | require Dev::Null; | |
| 14 | 1 | tie *STDERR, 'Dev::Null'; | |
| 15 | |||
| 16 | 1 | ok(1); | |
| 17 | 1 | ok(1); | |
| 18 | |||
| 19 | 1 | $! = 0; | |
| 20 | 1 | die "This is a test"; | |