BEGIN {
use Config;
unless ($Config{d_fork}) {
- print "1..0 # no fork\n";
+ print "1..0 # Skip: no fork\n";
exit 0;
}
eval { use POSIX qw(sys_wait_h) };
if ($@) {
- print "1..0 # no POSIX sys_wait_h\n";
+ print "1..0 # Skip: no POSIX sys_wait_h\n";
exit 0;
}
eval { use Time::HiRes qw(time) };
if ($@) {
- print "1..0 # no Time::HiRes\n";
+ print "1..0 # Skip: no Time::HiRes\n";
exit 0;
}
}
1..0 # Skipped: no leverage found
+If you don't have any comment on skipping, just print C<1..0> with
+nothing after it. Test::Harness will say something like this:
+
+op/64bitint..............skipped
+ skipped: no reason given
+
+
=item B<Todo tests>
If the standard output line contains the substring C< # TODO> after
$self->{max} = $max;
assert( $self->{max} >= 0, 'Max # of tests looks right' );
- if( defined $extra ) {
+ if( not $max and not $extra) {
+ #We're skipping, thats for sure
+ $self->{skip_all} = 'no reason given';
+ }
+ elsif( defined $extra ) {
my($todo, $skip, $reason) = $extra =~ /$Extra_Header_Re/xo;
$self->{todo} = { map { $_ => 1 } split /\s+/, $todo } if $todo;
BEGIN {
eval { my $q = pack "q", 0 };
if ($@) {
- print "1..0\n# Skip: no 64-bit types\n";
+ print "1..0 # Skip: no 64-bit types\n";
exit(0);
}
chdir 't' if -d 't';
sub skip_all {
if (@_) {
- print STDOUT "1..0 - @_\n";
+ print STDOUT "1..0 # Skipped: @_\n";
} else {
print STDOUT "1..0\n";
}