From: Jerry D. Hedden Date: Sun, 1 Jul 2007 15:23:37 +0000 (-0400) Subject: Address 250_ping_hires.t failure X-Git-Tag: accepted/trunk/20130322.191538~14962 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=629cba96727598e4b29186228abaa02879453180;p=platform%2Fupstream%2Fperl.git Address 250_ping_hires.t failure From: "Jerry D. Hedden" Message-ID: <1ff86f510707011223u7557fc53m9df980815479892a@mail.gmail.com> p4raw-id: //depot/perl@31517 --- diff --git a/lib/Net/Ping/t/250_ping_hires.t b/lib/Net/Ping/t/250_ping_hires.t index 91e905f..a2187d0 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"); +}