develooper Front page | perl.qa | Postings from February 2009

Test skip()'ing weirdness

Thread Next
From:
Pedro Figueiredo
Date:
February 18, 2009 10:14
Subject:
Test skip()'ing weirdness
Message ID:
499C4FF6.60600@pedrofigueiredo.org
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

$ /usr/bin/perl -MTest::More -le 'print $Test::More::VERSION'
0.86

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)

$ /usr/local/bin/perl -MTest::More -le 'print $Test::More::VERSION'
0.86

Still not what I expected, 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)

$ /usr/bin/perl -MTest::More -le 'print $Test::More::VERSION'
0.62

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

$ /usr/local/bin/perl -MTest::More -le 'print $Test::More::VERSION'
0.86

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

Cheers,

Pedro


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About