Change 13860 by jhi@alpha on 2001/12/23 01:29:45

        More \X fixing.

Affected files ...

.... //depot/perl/regexec.c#219 edit
.... //depot/perl/t/op/pat.t#136 edit

Differences ...

==== //depot/perl/regexec.c#219 (text) ====
Index: perl/regexec.c
--- perl/regexec.c.~1~  Sat Dec 22 18:45:06 2001
+++ perl/regexec.c      Sat Dec 22 18:45:06 2001
@@ -2591,16 +2591,19 @@
            nextchr = UCHARAT(++locinput);
            break;
        case CLUMP:
-           LOAD_UTF8_CHARCLASS(mark,"~");
-           if (locinput >= PL_regeol ||
-               swash_fetch(PL_utf8_mark,(U8*)locinput, do_utf8))
+           if (locinput >= PL_regeol)
                sayNO;
-           locinput += PL_utf8skip[nextchr];
-           while (locinput < PL_regeol &&
-                  swash_fetch(PL_utf8_mark,(U8*)locinput, do_utf8))
-               locinput += UTF8SKIP(locinput);
-           if (locinput > PL_regeol)
-               sayNO;
+           if  (do_utf8) {
+               LOAD_UTF8_CHARCLASS(mark,"~");
+               if (swash_fetch(PL_utf8_mark,(U8*)locinput, do_utf8))
+                   sayNO;
+               locinput += PL_utf8skip[nextchr];
+               while (locinput < PL_regeol &&
+                      swash_fetch(PL_utf8_mark,(U8*)locinput, do_utf8))
+                   locinput += UTF8SKIP(locinput);
+               if (locinput > PL_regeol)
+                   sayNO;
+           }
            nextchr = UCHARAT(locinput);
            break;
        case REFFL:

==== //depot/perl/t/op/pat.t#136 (xtext) ====
Index: perl/t/op/pat.t
--- perl/t/op/pat.t.~1~ Sat Dec 22 18:45:06 2001
+++ perl/t/op/pat.t     Sat Dec 22 18:45:06 2001
@@ -6,7 +6,7 @@
 
 $| = 1;
 
-print "1..786\n";
+print "1..792\n";
 
 BEGIN {
     chdir 't' if -d 't';
@@ -2389,3 +2389,18 @@
     # Before #13843 this was failing by matching falsely.
     print "_:$char:_" =~ m/_:$SIGMA:_/i ? "not ok 786\n" : "ok 786\n";
 }
+
+{
+    print "# \\X\n";
+
+    use charnames ':full';
+
+    print "a!"              =~ /\X!/ ? "ok 787\n" : "not ok 787\n";
+    print "\xDF!"           =~ /\X!/ ? "ok 788\n" : "not ok 788\n";
+    print "\x{100}!"        =~ /\X!/ ? "ok 789\n" : "not ok 789\n";
+    print "\x{100}\x{300}!" =~ /\X!/ ? "ok 790\n" : "not ok 790\n";
+    print "\N{LATIN CAPITAL LETTER E}!" =~ /\X!/ ?
+       "ok 791\n" : "not ok 791\n";
+    print "\N{LATIN CAPITAL LETTER E}\N{COMBINING GRAVE ACCENT}!" =~ /\X!/ ?
+       "ok 792\n" : "not ok 792\n";
+}
End of Patch.

Reply via email to