summaryrefslogtreecommitdiff
path: root/t/op/pat.t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-12-22 02:47:08 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-22 02:47:08 +0000
commita5961de5f4215b5cd376e88c8c5d267c7f7123f6 (patch)
tree84f55358517d319d1b067b05c90e7034e1e4a29e /t/op/pat.t
parent96c57f7e641f15cc924272c2d866750e62c1b955 (diff)
downloadperl-a5961de5f4215b5cd376e88c8c5d267c7f7123f6.tar.gz
Unicode casefolding fixes.
p4raw-id: //depot/perl@13843
Diffstat (limited to 't/op/pat.t')
-rwxr-xr-xt/op/pat.t35
1 files changed, 34 insertions, 1 deletions
diff --git a/t/op/pat.t b/t/op/pat.t
index 077b9579e5..ee7a736091 100755
--- a/t/op/pat.t
+++ b/t/op/pat.t
@@ -6,7 +6,7 @@
$| = 1;
-print "1..757\n";
+print "1..769\n";
BEGIN {
chdir 't' if -d 't';
@@ -2291,3 +2291,36 @@ print "# some Unicode properties\n";
print "not " unless "A\x{100}" =~ /A/i;
print "ok 757\n";
}
+
+{
+ use charnames ':full';
+
+ print "# LATIN LETTER A WITH GRAVE\n";
+ my $lower = "\N{LATIN SMALL LETTER A WITH GRAVE}";
+ my $UPPER = "\N{LATIN CAPITAL LETTER A WITH GRAVE}";
+
+ print $lower =~ m/$UPPER/i ? "ok 758\n" : "not ok 758\n";
+ print $UPPER =~ m/$lower/i ? "ok 759\n" : "not ok 759\n";
+ print $lower =~ m/[$UPPER]/i ? "ok 760\n" : "not ok 760\n";
+ print $UPPER =~ m/[$lower]/i ? "ok 761\n" : "not ok 761\n";
+
+ print "# GREEK LETTER ALPHA WITH VRACHY\n";
+
+ $lower = "\N{GREEK CAPITAL LETTER ALPHA WITH VRACHY}";
+ $UPPER = "\N{GREEK SMALL LETTER ALPHA WITH VRACHY}";
+
+ print $lower =~ m/$UPPER/i ? "ok 762\n" : "not ok 762\n";
+ print $UPPER =~ m/$lower/i ? "ok 763\n" : "not ok 763\n";
+ print $lower =~ m/[$UPPER]/i ? "ok 764\n" : "not ok 764\n";
+ print $UPPER =~ m/[$lower]/i ? "ok 765\n" : "not ok 765\n";
+
+ print "# LATIN LETTER Y WITH DIAERESIS\n";
+
+ $lower = "\N{LATIN CAPITAL LETTER Y WITH DIAERESIS}";
+ $UPPER = "\N{LATIN SMALL LETTER Y WITH DIAERESIS}";
+
+ print $lower =~ m/$UPPER/i ? "ok 766\n" : "not ok 766\n";
+ print $UPPER =~ m/$lower/i ? "ok 767\n" : "not ok 767\n";
+ print $lower =~ m/[$UPPER]/i ? "ok 768\n" : "not ok 768\n";
+ print $UPPER =~ m/[$lower]/i ? "ok 769\n" : "not ok 769\n";
+}