X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2Flc.t;h=6b7625b54aa8b137b305b7fa296b68575e931f03;hb=6ec5370cb0aeb185d92b8fd2bad21bb10f75b30e;hp=571868fe027a9d1acba506a9eb6e2f68858d75c4;hpb=c2955298f73609931e7742722d6cdab7cad91e16;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/lc.t b/t/op/lc.t index 571868f..6b7625b 100644 --- a/t/op/lc.t +++ b/t/op/lc.t @@ -6,7 +6,12 @@ BEGIN { require './test.pl'; } -plan tests => 87; +plan tests => 93; + +is(lc(undef), "", "lc(undef) is ''"); +is(lcfirst(undef), "", "lcfirst(undef) is ''"); +is(uc(undef), "", "uc(undef) is ''"); +is(ucfirst(undef), "", "ucfirst(undef) is ''"); $a = "HELLO.* world"; $b = "hello.* WORLD"; @@ -136,13 +141,13 @@ $b = "\x{3a3}FOO.BAR"; # \x{3a3} == GREEK CAPITAL LETTER SIGMA. ($c = $b) =~ s/(\w+)/lc($1)/ge; is($c , $a, "Using s///e to change case."); -($c = $a) =~ s/(\w+)/uc($1)/ge; +($c = $a) =~ s/(\p{IsWord}+)/uc($1)/ge; is($c , $b, "Using s///e to change case."); -($c = $b) =~ s/(\w+)/lcfirst($1)/ge; +($c = $b) =~ s/(\p{IsWord}+)/lcfirst($1)/ge; is($c , "\x{3c3}FOO.bAR", "Using s///e to change case."); -($c = $a) =~ s/(\w+)/ucfirst($1)/ge; +($c = $a) =~ s/(\p{IsWord}+)/ucfirst($1)/ge; is($c , "\x{3a3}foo.Bar", "Using s///e to change case."); # #18931: perl5.8.0 bug in \U..\E processing @@ -205,3 +210,13 @@ for (1, 4, 9, 16, 25) { is(lc "\x{0130}" x $_, "i\x{307}" x $_, 'lc U+0130 grows'); } + +# bug #43207 +my $temp = "Hello"; +for ("$temp") { + lc $_; + is($_, "Hello"); +} + +# new in Unicode 5.1.0 +is(lc("\x{1E9E}"), "\x{df}", "lc(LATIN CAPITAL LETTER SHARP S)");