diff options
author | Nicholas Clark <nick@ccl4.org> | 2003-08-21 23:26:18 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-22 08:20:15 +0000 |
commit | 40837afcb0b195c90e4d9b17d791c9d4dd4f223b (patch) | |
tree | e36ffdb8b4fca09c110c000755b10b5f83978500 /t | |
parent | 53f3fd80bed2bdd648b835eb98b97cad129ac8ff (diff) | |
download | perl-40837afcb0b195c90e4d9b17d791c9d4dd4f223b.tar.gz |
Re: [perl #23463] compiler version on sparc/netbsd
Message-ID: <20030821222618.T558@plum.flirble.org>
p4raw-id: //depot/perl@20824
Diffstat (limited to 't')
-rwxr-xr-x | t/op/pack.t | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/t/op/pack.t b/t/op/pack.t index a0d8b7ade6..e5b8203525 100755 --- a/t/op/pack.t +++ b/t/op/pack.t @@ -160,7 +160,7 @@ sub list_eq ($$) { { - # test exceptions + print "# test exceptions\n"; my $x; eval { $x = unpack 'w', pack 'C*', 0xff, 0xff}; like($@, qr/^Unterminated compressed integer/); @@ -225,8 +225,7 @@ sub list_eq ($$) { } -# -# test the "p" template +print "# test the 'p' template\n"; # literals is(unpack("p",pack("p","foo")), "foo"); @@ -255,8 +254,8 @@ like(pack("p", undef), qr/^\0+/); # see #ifdef __osf__ in pp.c pp_unpack is((unpack("i",pack("i",-1))), -1); -# test the pack lengths of s S i I l L -# test the pack lengths of n N v V +print "# test the pack lengths of s S i I l L n N v V\n"; + my @lengths = qw(s 2 S 2 i -4 I -4 l 4 L 4 n 2 N 4 v 2 V 4); while (my ($format, $expect) = splice @lengths, 0, 2) { my $len = length(pack($format, 0)); @@ -270,7 +269,8 @@ while (my ($format, $expect) = splice @lengths, 0, 2) { } -# test unpack-pack lengths +print "# test unpack-pack lengths\n"; + my @templates = qw(c C i I s S l L n N v V f d q Q); foreach my $t (@templates) { @@ -367,7 +367,7 @@ foreach ( } } -# packing native shorts/ints/longs +print "# packing native shorts/ints/longs\n"; is(length(pack("s!", 0)), $Config{shortsize}); is(length(pack("i!", 0)), $Config{intsize}); @@ -389,6 +389,7 @@ sub numbers_with_total { $total += $_; } } + print "# numbers test for $format\n"; foreach (@_) { SKIP: { my $out = eval {unpack($format, pack($format, $_))}; @@ -522,7 +523,7 @@ numbers_with_total ('Q', sub { 0, 1,9223372036854775807, 9223372036854775808, 18446744073709551615); -# pack nvNV byteorders +print "# pack nvNV byteorders\n"; is(pack("n", 0xdead), "\xde\xad"); is(pack("v", 0xdead), "\xad\xde"); |