Test skip()'ing weirdness

Pedro Figueiredo me at pedrofigueiredo.org
Mon Feb 16 08:36:04 GMT 2009


Hi,

I've had a report from a user regarding some tests under Darwin (10.5.6, 
Leopard, I have no idea if it happens on earlier versions too). I've 
since noticed the behaviour under 5.10 on Linux is not what I expected 
either.

This is the test code:

#!perl -T

use strict;

use Test::More tests => 1;

SKIP: {
     skip( "meh", 1 );
     ok( 1, "dud" );
}

Darwin (10.5.6, Leopard)
perl 5.8.8:
$ prove foo.t
foo....ok
All tests successful.
Files=1, Tests=1,  0 wallclock secs ( 0.02 usr  0.00 sys +  0.02 cusr  
0.00 csys =  0.04 CPU)
Result: PASS

perl 5.10.0:
$ prove foo.t
foo....ok
         1/1 skipped: various reasons
All tests successful, 1 subtest skipped.
Files=1, Tests=1,  0 wallclock secs ( 0.02 cusr +  0.00 csys =  0.02 CPU)

Still not what I excpected, but better than 5.8.8.

Linux (Ubuntu Server 8.04)
perl 5.8.8:
$ prove foo.t
foo....ok
         1/1 skipped: meh
All tests successful, 1 subtest skipped.
Files=1, Tests=1,  0 wallclock secs ( 0.05 cusr +  0.00 csys =  0.05 CPU)

perl 5.10.0:
$ prove foo.t
foo....ok
All tests successful.
Files=1, Tests=1,  0 wallclock secs ( 0.05 usr  0.01 sys +  0.04 cusr  
0.00 csys =  0.10 CPU)
Result: PASS

5.8.8 is the default system Perl in both Darwin and Linux, 5.10.0 was 
installed manually by me. Can anyone please shine a light on this?

Cheers,

Pedro


More information about the london.pm mailing list