This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
lc.t: Add tests for previously broken IN_UNI_8_BIT
authorKarl Williamson <public@khwilliamson.com>
Sun, 29 Jan 2012 20:47:29 +0000 (13:47 -0700)
committerKarl Williamson <public@khwilliamson.com>
Sun, 29 Jan 2012 20:58:13 +0000 (13:58 -0700)
This adds tests for commit b36bf33f6564c3e9a9ff131f4f3c9980b7a8af15

t/op/lc.t

index 08efdc0..5a71163 100644 (file)
--- a/t/op/lc.t
+++ b/t/op/lc.t
@@ -10,7 +10,7 @@ BEGIN {
 
 use feature qw( fc );
 
-plan tests => 124;
+plan tests => 128;
 
 is(lc(undef),     "", "lc(undef) is ''");
 is(lcfirst(undef), "", "lcfirst(undef) is ''");
@@ -271,3 +271,12 @@ for ("$temp") {
 
 # new in Unicode 5.1.0
 is(lc("\x{1E9E}"), "\x{df}", "lc(LATIN CAPITAL LETTER SHARP S)");
+
+{
+    use feature 'unicode_strings';
+    use bytes;
+    is(lc("\xc0"), "\xc0", "lc of above-ASCII Latin1 is itself under use bytes");
+    is(lcfirst("\xc0"), "\xc0", "lcfirst of above-ASCII Latin1 is itself under use bytes");
+    is(uc("\xe0"), "\xe0", "uc of above-ASCII Latin1 is itself under use bytes");
+    is(ucfirst("\xe0"), "\xe0", "ucfirst of above-ASCII Latin1 is itself under use bytes");
+}