X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2Ftime.t;h=1bec442fe2e8fdc9a37cb30aca5229a6fa4d2bfc;hb=7a4c00b4303a05a04564a03a88f4fa5c7a06a6e9;hp=6d23832dfa11d183503c913e37db2540fcbb8c48;hpb=463ee0b2acbd047c27e8b5393cdd8398881824c5;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/time.t b/t/op/time.t index 6d23832..1bec442 100755 --- a/t/op/time.t +++ b/t/op/time.t @@ -2,7 +2,8 @@ # $RCSfile: time.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:32 $ -print "1..5\n"; +if ($does_gmtime = gmtime(time)) { print "1..5\n" } +else { print "1..3\n" } ($beguser,$begsys) = times; @@ -14,7 +15,8 @@ if ($now > $beg && $now - $beg < 10){print "ok 1\n";} else {print "not ok 1\n";} for ($i = 0; $i < 100000; $i++) { ($nowuser, $nowsys) = times; - $i = 200000 if $nowuser > $beguser && $nowsys > $begsys; + $i = 200000 if $nowuser > $beguser && ( $nowsys > $begsys || + (!$nowsys && !$begsys)); last if time - $beg > 20; } @@ -29,6 +31,8 @@ if ($sec != $xsec && $mday && $year) else {print "not ok 3\n";} +exit 0 unless $does_gmtime; + ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($beg); ($xsec,$foo) = localtime($now); @@ -37,7 +41,7 @@ if ($sec != $xsec && $mday && $year) else {print "not ok 4\n";} -if (index(" :0:1:-1:365:366:-365:-366:",':' . ($localyday - $yday) . ':') > 0) +if (index(" :0:1:-1:364:365:-364:-365:",':' . ($localyday - $yday) . ':') > 0) {print "ok 5\n";} else {print "not ok 5\n";}