summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJerry D. Hedden <jdhedden@cpan.org>2007-07-01 11:23:37 -0400
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-07-02 13:28:50 +0000
commit629cba96727598e4b29186228abaa02879453180 (patch)
treec55726d74bafb378e2b8711dd0549b629a97ad20 /lib
parenta662d730755bd4763502de042ac949ef3a7a71ae (diff)
downloadperl-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')
-rw-r--r--lib/Net/Ping/t/250_ping_hires.t9
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");
+}