Add a test case for [perl #15288] (already solved).
authorJarkko Hietaniemi <jhi@iki.fi>
Sun, 27 Apr 2003 08:13:34 +0000 (08:13 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Sun, 27 Apr 2003 08:13:34 +0000 (08:13 +0000)
p4raw-id: //depot/perl@19351

t/op/pack.t

index d3be738..0c7d51d 100755 (executable)
@@ -6,7 +6,7 @@ BEGIN {
     require './test.pl';
 }
 
-plan tests => 5849;
+plan tests => 5852;
 
 use strict;
 use warnings;
@@ -1100,3 +1100,11 @@ ok(pack('u2', 'AA'), "[perl #8026]"); # used to hang and eat RAM in perl 5.7.2
 
 $_ = pack('c', 65); # 'A' would not be EBCDIC-friendly
 is(unpack('c'), 65, "one-arg unpack (change #18751)"); # defaulting to $_
+
+{
+    my $a = "X\t01234567\n" x 100;
+    my @a = unpack("(a1 c/a)*", $a);
+    is(scalar @a, 200,       "[perl #15288]");
+    is($a[-1], "01234567\n", "[perl #15288]");
+    is($a[-2], "X",          "[perl #15288]");
+}