From: Nicholas Clark Date: Thu, 21 Aug 2003 22:26:18 +0000 (+0100) Subject: Re: [perl #23463] compiler version on sparc/netbsd X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=40837afcb0b195c90e4d9b17d791c9d4dd4f223b;p=p5sagit%2Fp5-mst-13.2.git Re: [perl #23463] compiler version on sparc/netbsd Message-ID: <20030821222618.T558@plum.flirble.org> p4raw-id: //depot/perl@20824 --- diff --git a/t/op/pack.t b/t/op/pack.t index a0d8b7a..e5b8203 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");