summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorperl-5.8.0@ton.iguana.be <perl-5.8.0@ton.iguana.be>2005-02-05 18:09:00 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-02-08 09:31:45 +0000
commitf0df5f8b34ab27424e2b758635888ff39aa69398 (patch)
tree7dd0757341df08bda8095b4fd8723da63634422f /t
parent580a9fe1f2eadca33b9bfe7700739a00e7d804ca (diff)
downloadperl-f0df5f8b34ab27424e2b758635888ff39aa69398.tar.gz
[perl #34062] pack Z0 destroys the character before
From: perl-5.8.0@ton.iguana.be (via RT) <perlbug-followup@perl.org> Message-ID: <rt-3.0.11-34062-107199.19.360569328007@perl.org> (plus a regression test) p4raw-id: //depot/perl@23946
Diffstat (limited to 't')
-rwxr-xr-xt/op/pack.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/op/pack.t b/t/op/pack.t
index e51cc47ade..3255806544 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 => 13863;
+plan tests => 13864;
use strict;
use warnings;
@@ -1518,3 +1518,9 @@ is(unpack('c'), 65, "one-arg unpack (change #18751)"); # defaulting to $_
is(join(',', unpack("aU0C/UU", "b\0\341\277\274")), 'b,8188');
is(join(',', unpack("aU0C/CU", "b\0\341\277\274")), 'b,8188');
}
+
+{
+ # "Z0" (bug #34062)
+ my (@x) = unpack("C*", pack("CZ0", 1, "b"));
+ is(join(',', @x), '1', 'pack Z0 doesn\'t destroy the character before');
+}