Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

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)



Download (untitled) / with headers
text/plain 662b
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.
Download (untitled) / with headers
text/plain 812b
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.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.