diff options
author | Ton Hospel <perl5-porters@ton.iguana.be> | 2005-01-29 12:41:20 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-01-31 23:08:59 +0000 |
commit | 0ed7c1bbe9e393cef0b94251a5a51525bd4e04ad (patch) | |
tree | b98ed4a2851062fa14c809d639f8ba826fad9d73 /t/op/pack.t | |
parent | 4c3bbe0f1940fe1418b3633a0eb6151f5eccf740 (diff) | |
download | perl-0ed7c1bbe9e393cef0b94251a5a51525bd4e04ad.tar.gz |
Re: encoding neutral unpack
From: perl5-porters[at]ton.iguana.be (Ton Hospel)
Message-ID: <ctg09g$j0e$1[at]post.home.lunix>
Forgotten character progress while checksumming over partial
b or B format. (plus a regression test)
p4raw-id: //depot/perl@23915
Diffstat (limited to 't/op/pack.t')
-rwxr-xr-x | t/op/pack.t | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/t/op/pack.t b/t/op/pack.t index 102a0ce360..d30ae94474 100755 --- a/t/op/pack.t +++ b/t/op/pack.t @@ -12,7 +12,7 @@ my $no_endianness = $] > 5.009 ? '' : my $no_signedness = $] > 5.009 ? '' : "Signed/unsigned pack modifiers not available on this perl"; -plan tests => 13855; +plan tests => 13856; use strict; use warnings; @@ -1491,3 +1491,11 @@ is(unpack('c'), 65, "one-arg unpack (change #18751)"); # defaulting to $_ is($a[-1], "01234567\n", "[perl #15288]"); is($a[-2], "X", "[perl #15288]"); } + +# checksums +{ + # verify that unpack advances correctly wrt a checksum + my (@x) = unpack("b10a", "abcd"); + my (@y) = unpack("%b10a", "abcd"); + is($x[1], $y[1], "checksum advance ok"); +} |