From: Jarkko Hietaniemi Date: Sun, 6 Jul 2003 07:19:17 +0000 (+0000) Subject: Reintroduce changes #19723 and #19723 that were not X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5dbd7494d59e729f1665fc8640ec73253c92ec21;p=p5sagit%2Fp5-mst-13.2.git Reintroduce changes #19723 and #19723 that were not in Net::Ping 2.31; needed for Windows. p4raw-link: @19723 on //depot/perl: 8eff326bc4ec5cde990026aa3a8ca58f85cb4bbc p4raw-id: //depot/perl@20021 --- diff --git a/lib/Net/Ping/t/250_ping_hires.t b/lib/Net/Ping/t/250_ping_hires.t index 52dae1b..91e905f 100644 --- a/lib/Net/Ping/t/250_ping_hires.t +++ b/lib/Net/Ping/t/250_ping_hires.t @@ -57,5 +57,7 @@ my ($ret, $duration) = $p -> ping("localhost"); ok $ret; # It is extremely likely that the duration contains a decimal -# point if Time::HiRes is functioning properly. -ok $duration =~ /\./; +# point if Time::HiRes is functioning properly, except when it +# it is fast enough to be "zero". +print "# duration=[$duration]\n"; +ok $duration =~ /\.|^0$/; diff --git a/lib/Net/Ping/t/450_service.t b/lib/Net/Ping/t/450_service.t index c41b84b..006bf64 100644 --- a/lib/Net/Ping/t/450_service.t +++ b/lib/Net/Ping/t/450_service.t @@ -19,7 +19,7 @@ use Net::Ping; # for the TCP Server stuff instead of doing # all that direct socket() junk manually. -plan tests => 26; +plan tests => 26, ($^O eq 'MSWin32' ? (todo => [18]) : ()); # Everything loaded fine ok 1;