summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-04-29 15:55:51 +0000
committerNicholas Clark <nick@ccl4.org>2006-04-29 15:55:51 +0000
commitd54190f6ca0aac8b08bb59370c53932771933c40 (patch)
tree59b956f34dde1ce87ba61af4c4c8bdcec5ed07c9 /t
parent673061948a634568cc156286d219e7f736c6048a (diff)
downloadperl-d54190f6ca0aac8b08bb59370c53932771933c40.tar.gz
lcfirst/ucfist plus an 8 bit locale could mangle UTF-8 values
returned by overloaded stringification. p4raw-id: //depot/perl@28013
Diffstat (limited to 't')
-rw-r--r--t/uni/overload.t18
1 files changed, 17 insertions, 1 deletions
diff --git a/t/uni/overload.t b/t/uni/overload.t
index 407d4c6a88..38328f1e97 100644
--- a/t/uni/overload.t
+++ b/t/uni/overload.t
@@ -7,7 +7,7 @@ BEGIN {
}
}
-use Test::More tests => 16;
+use Test::More tests => 24;
package UTF8Toggle;
use strict;
@@ -72,5 +72,21 @@ SKIP: {
$uc = uc $u;
is (length $uc, 1);
is ($uc, "\311", "e accute -> E accute");
+
+ $u = UTF8Toggle->new("\311");
+ $lc = lcfirst $u;
+ is (length $lc, 1);
+ is ($lc, "\351", "E accute -> e accute");
+ $lc = lcfirst $u;
+ is (length $lc, 1);
+ is ($lc, "\351", "E accute -> e accute");
+
+ $u = UTF8Toggle->new("\351");
+ $uc = ucfirst $u;
+ is (length $uc, 1);
+ is ($uc, "\311", "e accute -> E accute");
+ $uc = ucfirst $u;
+ is (length $uc, 1);
+ is ($uc, "\311", "e accute -> E accute");
}
}