# -*- Mode: cperl; cperl-indent-level: 4 -*-
-# $Id: Harness.pm,v 1.29 2002/05/17 23:04:11 schwern Exp $
+# $Id: Harness.pm,v 1.31 2002/05/18 20:19:06 schwern Exp $
package Test::Harness;
$Have_Devel_Corestack = 0;
-$VERSION = '2.22';
+$VERSION = '2.23';
$ENV{HARNESS_ACTIVE} = 1;
bonus => $results{bonus},
skipped => $results{skip},
skip_reason => $Strap->{_skip_reason},
+ skip_all => $Strap->{skip_all},
ml => $ml,
);
print "$test{ml}ok\n ".join(', ', @msg)."\n";
} elsif ($test{max}) {
print "$test{ml}ok\n";
- } elsif (defined $test{skip_reason}) {
- print "skipped\n all skipped: $test{skip_reason}\n";
+ } elsif (defined $test{skip_all}) {
+ print "skipped\n all skipped: $test{skip_all}\n";
$tot{skipped}++;
} else {
print "\n skipped test on this platform\n";
Revision history for Perl extension Test::Harness
+2.23 Wed May 22 12:59:47 EDT 2002
+ - reason for all skip wasn't being displayed. Broken in 2.20.
+ - Changed the wait status tests to conform with POSIX standards.
+ - Quieted some SYSTEM$ABORT noise leaking out from dying test tests
+ on VMS.
+
2.22 Fri May 17 19:01:35 EDT 2002
- Fixed parsing of #!/usr/bin/perl-current to not see a -t.
(RT #574)
# VMS uses native, not POSIX, exit codes.
my $die_exit = $IsVMS ? 44 : 1;
-my $die_wait = $IsVMS ? 1024 : 256;
+
+# We can only predict that the wait status should be zero or not.
+my $wait_non_zero = 1;
my %samples = (
combined => {
passing => 0,
'exit' => $die_exit,
- 'wait' => $die_wait,
+ 'wait' => $wait_non_zero,
max => 0,
seen => 0,
passing => 0,
'exit' => $die_exit,
- 'wait' => $die_wait,
+ 'wait' => $wait_non_zero,
max => 0,
seen => 4,
passing => 0,
'exit' => $die_exit,
- 'wait' => $die_wait,
+ 'wait' => $wait_non_zero,
max => 4,
seen => 4,
},
);
-plan tests => (keys(%samples) * 2) + 1;
+plan tests => (keys(%samples) * 3) + 1;
use_ok('Test::Harness::Straps');
delete $expect->{details};
delete $results{details};
+
+ # We can only check if it's zero or non-zero.
+ is( !!$results{'wait'}, !!$expect->{'wait'}, 'wait status' );
+ delete $results{'wait'};
+ delete $expect->{'wait'};
+
is_deeply(\%results, $expect, " the rest $test" );
}
# VMS uses native, not POSIX, exit codes.
my $die_estat = $IsVMS ? 44 : 1;
-my $die_wstat = $IsVMS ? 1024 : 256;
my %samples = (
simple => {
},
failed => {
estat => $die_estat,
- wstat => $die_wstat,
max => '??',
failed => '??',
canon => '??',
},
failed => {
estat => $die_estat,
- wstat => $die_wstat,
max => '??',
failed => '??',
canon => '??',
},
failed => {
estat => $die_estat,
- wstat => $die_wstat,
max => 4,
failed => 0,
canon => '??',
+use lib 'lib';
+use if ($^O eq 'VMS'), vmsish => 'hushed';
exit 1; # exit because die() can be noisy
ok 4
DUMMY_TEST
+use if $^O eq 'VMS', vmsish => 'hushed';
exit 1;
1..4
DUMMY_TEST
+use if $^O eq 'VMS', vmsish => 'hushed';
exit 1;