Commit | Line | Data |
---|---|---|
04955c14 | 1 | require Test::Simple; |
3c4bf434 | 2 | # $Id$ |
04955c14 | 3 | |
4 | push @INC, 't/lib'; | |
5 | require Test::Simple::Catch; | |
6 | my($out, $err) = Test::Simple::Catch::caught(); | |
7 | ||
8 | Test::Simple->import(tests => 2); | |
9 | ||
10 | # Test we still get the right exit code despite having a die | |
11 | # handler. | |
12 | $SIG{__DIE__} = sub {}; | |
13 | ||
14 | require Dev::Null; | |
15 | tie *STDERR, 'Dev::Null'; | |
16 | ||
17 | ok(1); | |
18 | ok(1); | |
c7623038 | 19 | |
20 | $! = 0; | |
04955c14 | 21 | die "This is a test"; |