X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=dev%2Fi386%2Flibtest-simple-perl%2Flibtest-simple-perl-0.80%2Ft%2Flib%2FTest%2FSimple%2Fsample_tests%2Fdeath_with_handler.plx;fp=dev%2Fi386%2Flibtest-simple-perl%2Flibtest-simple-perl-0.80%2Ft%2Flib%2FTest%2FSimple%2Fsample_tests%2Fdeath_with_handler.plx;h=2009a0e2dd1f2e9ba2c1ffa25695089ac456e12c;hb=8977e561d8a9eae6959218b0306c9df2056a38a9;hp=0000000000000000000000000000000000000000;hpb=df794b845212301ea0d267c919232538bfef356a;p=dh-make-perl diff --git a/dev/i386/libtest-simple-perl/libtest-simple-perl-0.80/t/lib/Test/Simple/sample_tests/death_with_handler.plx b/dev/i386/libtest-simple-perl/libtest-simple-perl-0.80/t/lib/Test/Simple/sample_tests/death_with_handler.plx new file mode 100644 index 0000000..2009a0e --- /dev/null +++ b/dev/i386/libtest-simple-perl/libtest-simple-perl-0.80/t/lib/Test/Simple/sample_tests/death_with_handler.plx @@ -0,0 +1,18 @@ +require Test::Simple; + +push @INC, 't/lib'; +require Test::Simple::Catch; +my($out, $err) = Test::Simple::Catch::caught(); + +Test::Simple->import(tests => 2); + +# Test we still get the right exit code despite having a die +# handler. +$SIG{__DIE__} = sub {}; + +require Dev::Null; +tie *STDERR, 'Dev::Null'; + +ok(1); +ok(1); +die "This is a test";