Test::Simple 0.81_02 has:
authorNicholas Clark <nick@ccl4.org>
Tue, 21 Oct 2008 06:49:53 +0000 (06:49 +0000)
committerDavid Mitchell <davem@iabyn.com>
Sat, 14 Feb 2009 23:07:29 +0000 (23:07 +0000)
  Features Changed
     - Now preserves the tests' exit code if it exits abnormally,
       rather than setting it to 255.

$! is non-zero with PERLIO=stdio in some cases, so die would have set
the exit code to $! (typically 9). Now that would show through, so
ensure $! *is* zero to make sure that the exit code is 255.

p4raw-id: //depot/perl@34545

(cherry picked from commit c76230386fc5e6fba9fdbeab473abbf4f4adcbe3)

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

index a7c0988..24f8cb2 100644 (file)
@@ -13,4 +13,5 @@ tie *STDERR, 'Dev::Null';
 ok(1);
 ok(1);
 ok(1);
+$! = 0;
 die "This is a test";