Commit | Line | Data |
---|---|---|
04955c14 | 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); | |
c7623038 | 18 | |
19 | $! = 0; | |
04955c14 | 20 | die "This is a test"; |