+#!/usr/bin/perl -w
+
# Can't use Test.pm, that's a 5.005 thing.
package My::Test;
'too_few.plx' => [4, 4],
'death.plx' => [255, 4],
'last_minute_death.plx' => [255, 4],
+ 'pre_plan_death.plx' => ['not zero', 'not zero'],
'death_in_eval.plx' => [0, 0],
'require.plx' => [0, 0],
);
my $wait_stat = system(qq{$Perl -"I../blib/lib" -"I../lib" -"I../t/lib" $file});
my $actual_exit = exitstatus($wait_stat);
- My::Test::ok( $actual_exit == $exit_code,
- "$test_name exited with $actual_exit (expected $exit_code)");
+ if( $exit_code eq 'not zero' ) {
+ My::Test::ok( $actual_exit != 0,
+ "$test_name exited with $actual_exit ".
+ "(expected $exit_code)");
+ }
+ else {
+ My::Test::ok( $actual_exit == $exit_code,
+ "$test_name exited with $actual_exit ".
+ "(expected $exit_code)");
+ }
}