This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
uc plus an 8 bit locale could get confused by UTF-8 values returned by
[perl5.git] / t / uni / overload.t
index 3ecfafb..407d4c6 100644 (file)
@@ -7,7 +7,7 @@ BEGIN {
     }
 }
 
-use Test::More tests => 12;
+use Test::More tests => 16;
 
 package UTF8Toggle;
 use strict;
@@ -64,5 +64,13 @@ SKIP: {
        $lc = lc $u;
        is (length $lc, 1);
        is ($lc, "\351", "E accute -> e accute");
+
+       $u = UTF8Toggle->new("\351");
+       my $uc = uc $u;
+       is (length $uc, 1);
+       is ($uc, "\311", "e accute -> E accute");
+       $uc = uc $u;
+       is (length $uc, 1);
+       is ($uc, "\311", "e accute -> E accute");
     }
 }