diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-02-11 08:05:12 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-02-11 08:05:12 +0000 |
commit | 5434b80cd17d7f3d5f7d40af3f7b72e167c183a8 (patch) | |
tree | a9844517561669728f0a3b19fd32d51b159b878d /t | |
parent | a8b77c32ecb4928958fab82ec07e68c523bd25fb (diff) | |
parent | e228fed99f968153ec65a3a899d5f6d4b7ebcbc1 (diff) | |
download | perl-5434b80cd17d7f3d5f7d40af3f7b72e167c183a8.tar.gz |
Integrate mainline
p4raw-id: //depot/perlio@14635
Diffstat (limited to 't')
-rwxr-xr-x | t/op/arith.t | 6 | ||||
-rwxr-xr-x | t/op/pack.t | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/t/op/arith.t b/t/op/arith.t index a607e60149..4205345a7e 100755 --- a/t/op/arith.t +++ b/t/op/arith.t @@ -1,6 +1,6 @@ #!./perl -w -print "1..132\n"; +print "1..133\n"; sub try ($$) { print +($_[1] ? "ok" : "not ok"), " $_[0]\n"; @@ -264,4 +264,8 @@ tryeq 130, 18446744073709551616/9223372036854775808, 2; # -167772160. It's actually undefined behaviour, so anything may happen. my $int = ($n % 1000) * 167772160; tryeq 132, $int, 21307064320; + + my $t = time; + my $t1000 = time() * 1000; + try 133, abs($t1000 -1000 * $t) <= 2000; } diff --git a/t/op/pack.t b/t/op/pack.t index 38d015bd01..d1a8032beb 100755 --- a/t/op/pack.t +++ b/t/op/pack.t @@ -531,8 +531,13 @@ EOP is($z, $expect); } -is("1.20.300.4000", sprintf "%vd", pack("U*",1,20,300,4000)); -is("1.20.300.4000", sprintf "%vd", pack(" U*",1,20,300,4000)); + +SKIP: { + skip("(EBCDIC and) version strings are bad idea", 2) if $Is_EBCDIC; + + is("1.20.300.4000", sprintf "%vd", pack("U*",1,20,300,4000)); + is("1.20.300.4000", sprintf "%vd", pack(" U*",1,20,300,4000)); +} isnt(v1.20.300.4000, sprintf "%vd", pack("C0U*",1,20,300,4000)); my $rslt = $Is_EBCDIC ? "156 67" : "199 162"; |