diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-05-18 14:35:47 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-05-18 14:36:10 -0700 |
commit | c5333953a555847ef4f1457905bf0f111a79eb72 (patch) | |
tree | ed4ecae542122978fa917c8adab4ed0dab72cfe6 /t | |
parent | 3194a40a2b5938cb9768640166e46dd3bc670e0b (diff) | |
download | perl-c5333953a555847ef4f1457905bf0f111a79eb72.tar.gz |
[perl #90160] U* gives ‘U0 mode on an empty string’
This is a regression in 5.10 caused by change 23966/08ca2aa38a29,
which added a bit of faulty logic. It was treating U* in the middle of
a pack template as equivalent to U0, if the input string was empty.
Diffstat (limited to 't')
-rw-r--r-- | t/op/pack.t | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/t/op/pack.t b/t/op/pack.t index 025bb09f29..43189ab538 100644 --- 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 => 14699; +plan tests => 14700; use strict; use warnings qw(FATAL all); @@ -1993,3 +1993,7 @@ is(unpack('c'), 65, "one-arg unpack (change #18751)"); # defaulting to $_ my $y = runperl( prog => 'print split( /,/, unpack(q(%32u*), q(#,3,Q)), qq(\n)), qq(\n)' ); is($y, "0\n", "split /a/, unpack('%32u*'...) didn't crash"); } + +#90160 +is(eval { () = unpack "C0 U*", ""; "ok" }, "ok", + 'medial U* on empty string'); |