In a test script for a module that uses Test::TCP I have some tests in a
SKIP block conditional on whether Test::TCP is available.
When these tests are run (ie Test::TCP can be loaded) the test count is
reset.
A minimal example case is this...
use Test::More tests => 2;
ok( 1, 'One' );
SKIP: {
eval { require Test::TCP };
skip 'Test::TCP needed for tests', 1 if $@;
ok( 2, 'Two' );
}
1;
Which produces this output...
Show quoted text
> prove -vl t/temp.t
t/temp.t ..
1..2
ok 1 - One
ok 1 - Two
# Looks like you planned 2 tests but ran 1.
Dubious, test returned 255 (wstat 65280, 0xff00)
All 2 subtests passed
Tests run on an i686 running Debian 4.0
J.