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 #18931].
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 9 Dec 2002 22:48:39 +0000 (22:48 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 9 Dec 2002 22:48:39 +0000 (22:48 +0000)
(The bug was fixed by change #18266.)
p4raw-link: @18266 on //depot/perl: ada6e8a992d3696f2a5e84c5e93d2fce8998ecfb

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

t/op/lc.t

index 332bf42..a5f373e 100644 (file)
--- a/t/op/lc.t
+++ b/t/op/lc.t
@@ -6,7 +6,7 @@ BEGIN {
     require './test.pl';
 }
 
-plan tests => 55;
+plan tests => 57;
 
 $a = "HELLO.* world";
 $b = "hello.* WORLD";
@@ -138,3 +138,14 @@ ok($c eq "\x{3c3}FOO.bAR", "Using s///e to change case.");
 
 ($c = $a) =~ s/(\w+)/ucfirst($1)/ge;
 ok($c eq "\x{3a3}foo.Bar", "Using s///e to change case.");
+
+# #18931: perl5.8.0 bug in \U..\E processing
+# Test case from Nick Clark.
+for my $a (0,1) {
+    $_ = 'abcdefgh';
+    $_ .= chr 256;
+    chop;
+    /(.*)/;
+    is(uc($1), "ABCDEFGH", "[perl #18931]");
+}
+