Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-TCP CPAN distribution.

Report information
The Basics
Id: 60426
Status: resolved
Priority: 0/
Queue: Test-TCP

People
Owner: Nobody in particular
Requestors: obrien.jk [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.01
Fixed in: (no value)



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.
fixed at 1.02, thanks! On 2010-8月-17 火 11:57:34, jkobrien wrote: Show quoted text
> 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... >
> > 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.