summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKarl Williamson <khw@khw-desktop.(none)>2010-06-02 15:07:29 -0600
committerRafael Garcia-Suarez <rgs@consttype.org>2010-06-15 12:30:19 +0200
commit4c8a458a2f2be4d98cd2b8873f15b800e9382262 (patch)
treebb9bc2ce3e20932bebe27735f711ef3519c60a1f /t
parentcc70200b5f52ae10e2985e4d11670b3b76984b4d (diff)
downloadperl-4c8a458a2f2be4d98cd2b8873f15b800e9382262.tar.gz
uc(): Handle Greek YPOGEGRAMMENI
Unicode contains two context-sensitive case-changing rules. This patch enables one of them, dealing with the Greek YPOGEGRAMMENI. The code had been #ifdef'd out, so the changes here are more than what the diff shows. The reason it was #ifdef'd out was because more research was needed to verify that it was correct, which I have now done, and think it is. The issue is we may just be uppercasing a portion of the context, so don't have complete knowledge of what should be done. This patch causes us to move the ypogegrammeni to as far right as it should go, or to the end of the context we know about, whichever comes first. That's the best we can do. If it really should be moved further to the right, there's no way we can do it, because the user has not called uc() with the full information needed. So, in all cases, this is better than just leaving it where it was in the input. Also, the applicable context is limited to a logical character, that matched by /\X/, so if the user is calling uc() on a subset of a logical character, it really is their mistake.
Diffstat (limited to 't')
-rw-r--r--t/uni/upper.t4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/uni/upper.t b/t/uni/upper.t
index 4229cfeb76..b343a1fc20 100644
--- a/t/uni/upper.t
+++ b/t/uni/upper.t
@@ -4,7 +4,9 @@ BEGIN {
require "case.pl";
}
-casetest( 0, # extra tests already run
+is(uc("\x{3B1}\x{345}\x{301}"), "\x{391}\x{301}\x{399}", 'Verify moves YPOGEGRAMMENI');
+
+casetest( 1, # extra tests already run
"Upper", \%utf8::ToSpecUpper,
sub { uc $_[0] },
sub { my $a = ""; uc ($_[0] . $a) });