This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add Nicholas Clark's test case for [perl #18915].
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 9 Dec 2002 23:21:58 +0000 (23:21 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 9 Dec 2002 23:21:58 +0000 (23:21 +0000)
(The bug was fixed by change #18266.)
p4raw-link: @18266 on //depot/perl: ada6e8a992d3696f2a5e84c5e93d2fce8998ecfb

p4raw-id: //depot/maint-5.8/perl@18275

t/op/split.t

index 5f20c1a..5b8535c 100755 (executable)
@@ -6,7 +6,7 @@ BEGIN {
     require './test.pl';
 }
 
-plan tests => 47;
+plan tests => 49;
 
 $FS = ':';
 
@@ -262,3 +262,17 @@ ok(@ary == 3 &&
     my @a = split /\r?\n/, "$char\n";
     ok(@a == 1 && $a[0] eq $char && !defined($warn));
 }
+
+{
+    # [perl #18195]
+    for my $a (0,1) {
+       $_ = 'readin,database,readout';
+       if ($ARGV[0])  {
+           $_ .= chr 256;
+           chop;
+       }
+       /(.+)/;
+       my @d = split /[,]/,$1;
+       is(join (':',@d), 'readin:database:readout', "[perl #18195]")
+    }
+}