t/lib/Test/Simple/sample_tests/death_with_handler.plx

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 13 / 13 CC 1 SCAR 0.0
CC
1
Cov
100%
__ANON__
1.0
CRAP 1.0
« 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";
« t/lib/Test/Simple/sample_tests/death_in_eval.plx ↑ Summary t/lib/Test/Simple/sample_tests/exit.plx »