summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJeffrey Friedl <jfriedl@regex.info>2001-12-21 15:18:17 -0800
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-24 18:52:10 +0000
commite036fef9c83c3a56ef6c3a3bedfa658fcb8a2517 (patch)
tree5d6b825c799c906963ad29464bfaf6ca0983d30e /t
parentd1777648259a97c52b380dc00e781956751e1d6c (diff)
downloadperl-e036fef9c83c3a56ef6c3a3bedfa658fcb8a2517.tar.gz
and [BUG] \X and \C fixed, \X still dorked
Message-Id: <200112220718.fBM7IHG25075@ventrue.corp.yahoo.com> The rest of the tests for plus few extras. p4raw-id: //depot/perl@13879
Diffstat (limited to 't')
-rwxr-xr-xt/op/pat.t72
1 files changed, 71 insertions, 1 deletions
diff --git a/t/op/pat.t b/t/op/pat.t
index a8742f8cbd..0eda689cc5 100755
--- a/t/op/pat.t
+++ b/t/op/pat.t
@@ -6,7 +6,7 @@
$| = 1;
-print "1..812\n";
+print "1..825\n";
BEGIN {
chdir 't' if -d 't';
@@ -2450,3 +2450,73 @@ print "# some Unicode properties\n";
print $sigma =~ /[$Sigma]/i ? "ok 811\n" : "not ok 811\n";
print $sigma =~ /[$sigma]/i ? "ok 812\n" : "not ok 812\n";
}
+
+{
+ print "# parlez-vous?\n";
+
+ use charnames ':full';
+
+ print "fran\N{LATIN SMALL LETTER C}ais" =~
+ /fran.ais/ &&
+ $& eq "francais" ?
+ "ok 813\n" : "not ok 813\n";
+
+ print "fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais" =~
+ /fran.ais/ &&
+ $& eq "fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais" ?
+ "ok 814\n" : "not ok 814\n";
+
+ print "fran\N{LATIN SMALL LETTER C}ais" =~
+ /fran\Cais/ &&
+ $& eq "francais" ?
+ "ok 815\n" : "not ok 815\n";
+
+ print "franc\N{COMBINING CEDILLA}ais" =~
+ /franc\C\Cais/ ? # COMBINING CEDILLA is two bytes when encoded
+ "ok 816\n" : "not ok 816\n";
+
+ print "fran\N{LATIN SMALL LETTER C}ais" =~
+ /fran\Xais/ &&
+ $& eq "francais" ?
+ "ok 817\n" : "not ok 817\n";
+
+ print "fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais" =~
+ /fran\Xais/ &&
+ $& eq "fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais" ?
+ "ok 818\n" : "not ok 818\n";
+
+ print "franc\N{COMBINING CEDILLA}ais" =~
+ /fran\Xais/ &&
+ $& eq "franc\N{COMBINING CEDILLA}ais" ?
+ "ok 819\n" : "not ok 819\n";
+
+ print "fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais" =~
+ /fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais/ &&
+ $& eq "fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais" ?
+ "ok 820\n" : "not ok 820\n";
+
+ print "franc\N{COMBINING CEDILLA}ais" =~
+ /franc\N{COMBINING CEDILLA}ais/ &&
+ $& eq "franc\N{COMBINING CEDILLA}ais" ?
+ "ok 821\n" : "not ok 821\n";
+
+ print "fran\N{LATIN SMALL LETTER C}ais" =~
+ /fran(?:c\N{COMBINING CEDILLA}?|\N{LATIN SMALL LETTER C WITH CEDILLA})ais/ &&
+ $& eq "francais" ?
+ "ok 822\n" : "not ok 822\n";
+
+ print "fran\N{LATIN SMALL LETTER C}ais" =~
+ /fran(?:c\N{COMBINING CEDILLA}?|\N{LATIN SMALL LETTER C WITH CEDILLA})ais/ &&
+ $& eq "francais" ?
+ "ok 823\n" : "not ok 823\n";
+
+ print "fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais" =~
+ /fran(?:c\N{COMBINING CEDILLA}?|\N{LATIN SMALL LETTER C WITH CEDILLA})ais/ &&
+ $& eq "fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais" ?
+ "ok 824\n" : "not ok 824\n";
+
+ print "franc\N{COMBINING CEDILLA}ais" =~
+ /fran(?:c\N{COMBINING CEDILLA}?|\N{LATIN SMALL LETTER C WITH CEDILLA})ais/ &&
+ $& eq "franc\N{COMBINING CEDILLA}ais" ?
+ "ok 825\n" : "not ok 825\n";
+}