From: Jeffrey Friedl Date: Fri, 21 Dec 2001 23:18:17 +0000 (-0800) Subject: and [BUG] \X and \C fixed, \X still dorked X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e036fef9c83c3a56ef6c3a3bedfa658fcb8a2517;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/t/op/pat.t b/t/op/pat.t index a8742f8..0eda689 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"; +}