Skip Menu |
 

This queue is for tickets about the URI-Title CPAN distribution.

Report information
The Basics
Id: 5022
Status: resolved
Priority: 0/
Queue: URI-Title

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.1
Fixed in: 0.3



Subject: t/html.t should skip tests if there is no net connection (code provided)
Download (untitled) / with headers
text/plain 681b
If you can predict when tests will fail (detect pre-condition), you need to skip them :) use warnings; use strict; use Test::More tests => 2; use URI::Title qw(title); SKIP: { require IO::Socket; my $s = IO::Socket::INET->new( PeerAddr => "www.yahoo.com:80", Timeout => 10, ); if ($s) { close($s); } else { skip 2, " no net connection available"; } is( title('http://jerakeen.org'), "jerakeen.org", "got title for jerakeen.org"); is( title('http://theregister.co.uk/content/6/34549.html'), "Warning: lack of technology may harm your prospects", "got register title"); }


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.