diff options
author | Jerry D. Hedden <jdhedden@cpan.org> | 2007-07-01 11:23:37 -0400 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-07-02 13:28:50 +0000 |
commit | 629cba96727598e4b29186228abaa02879453180 (patch) | |
tree | c55726d74bafb378e2b8711dd0549b629a97ad20 /lib/Net | |
parent | a662d730755bd4763502de042ac949ef3a7a71ae (diff) | |
download | perl-629cba96727598e4b29186228abaa02879453180.tar.gz |
Address 250_ping_hires.t failure
From: "Jerry D. Hedden" <jdhedden@cpan.org>
Message-ID: <1ff86f510707011223u7557fc53m9df980815479892a@mail.gmail.com>
p4raw-id: //depot/perl@31517
Diffstat (limited to 'lib/Net')
-rw-r--r-- | lib/Net/Ping/t/250_ping_hires.t | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Net/Ping/t/250_ping_hires.t b/lib/Net/Ping/t/250_ping_hires.t index 91e905fb26..a2187d0001 100644 --- a/lib/Net/Ping/t/250_ping_hires.t +++ b/lib/Net/Ping/t/250_ping_hires.t @@ -23,7 +23,7 @@ BEGIN { } } -use Test; +use Test qw(plan ok $TESTERR); use Net::Ping; plan tests => 8; @@ -58,6 +58,7 @@ ok $ret; # It is extremely likely that the duration contains a decimal # point if Time::HiRes is functioning properly, except when it -# it is fast enough to be "zero". -print "# duration=[$duration]\n"; -ok $duration =~ /\.|^0$/; +# is fast enough to be "0", or slow enough to be exactly "1". +if (! ok($duration =~ /\.|^[01]$/)) { + print($TESTERR "# duration=[$duration]\n"); +} |