1require Test::Simple; 2 3push @INC, 't/lib'; 4require Test::Simple::Catch; 5my($out, $err) = Test::Simple::Catch::caught(); 6 7Test::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 13require Dev::Null; 14tie *STDERR, 'Dev::Null'; 15 16ok(1); 17ok(1); 18 19$! = 0; 20die "This is a test"; 21