Re: [PATCH] chom?p needs to remove read only fakery
[p5sagit/p5-mst-13.2.git] / t / op / pat.t
index fa4d1b3..6b4b061 100755 (executable)
@@ -6,7 +6,7 @@
 
 $| = 1;
 
-print "1..722\n";
+print "1..757\n";
 
 BEGIN {
     chdir 't' if -d 't';
@@ -2133,36 +2133,161 @@ print "# some Unicode properties\n";
     # Dashes, underbars, case.
     print "not " unless "\x80" =~ /\p{in-latin1_SUPPLEMENT}/;
     print "ok 716\n";
-}
 
-{
     # Complement, leading and trailing whitespace.
     print "not " unless "\x80" =~ /\P{  ^  In Latin 1 Supplement  }/;
     print "ok 717\n";
-}
 
-{
-    # No ^In, dashes, case.
-    print "not " unless "\x80" =~ /\p{latin-1-supplement}/;
+    # No ^In, dashes, case, dash, any intervening (word-break) whitespace.
+    # (well, newlines don't work...)
+    print "not " unless "\x80" =~ /\p{latin-1   supplement}/;
     print "ok 718\n";
 }
 
 {
     print "not " unless "a" =~ /\pL/;
     print "ok 719\n";
-}
 
-{
     print "not " unless "a" =~ /\p{IsLl}/;
     print "ok 720\n";
+
+    print "not " if     "a" =~ /\p{IsLu}/;
+    print "ok 721\n";
+
+    print "not " unless "a" =~ /\p{Ll}/;
+    print "ok 722\n";
+
+    print "not " if     "a" =~ /\p{Lu}/;
+    print "ok 723\n";
+
+    print "not " unless "A" =~ /\pL/;
+    print "ok 724\n";
+
+    print "not " unless "A" =~ /\p{IsLu}/;
+    print "ok 725\n";
+
+    print "not " if     "A" =~ /\p{IsLl}/;
+    print "ok 726\n";
+
+    print "not " unless "A" =~ /\p{Lu}/;
+    print "ok 727\n";
+
+    print "not " if     "A" =~ /\p{Ll}/;
+    print "ok 728\n";
+
+    print "not " if     "a" =~ /\PL/;
+    print "ok 729\n";
+
+    print "not " if     "a" =~ /\P{IsLl}/;
+    print "ok 730\n";
+
+    print "not " unless "a" =~ /\P{IsLu}/;
+    print "ok 731\n";
+
+    print "not " if     "a" =~ /\P{Ll}/;
+    print "ok 732\n";
+
+    print "not " unless "a" =~ /\P{Lu}/;
+    print "ok 733\n";
+
+    print "not " if     "A" =~ /\PL/;
+    print "ok 734\n";
+
+    print "not " if     "A" =~ /\P{IsLu}/;
+    print "ok 735\n";
+
+    print "not " unless "A" =~ /\P{IsLl}/;
+    print "ok 736\n";
+
+    print "not " if     "A" =~ /\P{Lu}/;
+    print "ok 737\n";
+
+    print "not " unless "A" =~ /\P{Ll}/;
+    print "ok 738\n";
+
 }
 
 {
-    print "not " unless "A" =~ /\pL/;
-    print "ok 721\n";
+    print "not " if     "a" =~ /\p{Common}/;
+    print "ok 739\n";
+
+    print "not " unless "1" =~ /\p{Common}/;
+    print "ok 740\n";
 }
 
 {
-    print "not " unless "A" =~ /\p{IsLu}/;
-    print "ok 722\n";
+    print "not " if     "a"       =~ /\p{Inherited}/;
+    print "ok 741\n";
+
+    print "not " unless "\x{300}" =~ /\p{Inherited}/;
+    print "ok 742\n";
+}
+
+{
+    print "not " unless "a" =~ /\p{L&}/;
+    print "ok 743\n";
+
+    print "not " if     "1" =~ /\p{L&}/;
+    print "ok 744\n";
+}
+
+{
+    print "not " unless "a" =~ /\p{LowercaseLetter}/;
+    print "ok 745\n";
+
+    print "not " if     "A" =~ /\p{
+                                       Lowercase
+                                       Letter
+                                 }/x;
+    print "ok 746\n";
+}
+
+{
+    print "not " unless "\x{AC00}" =~ /\p{HangulSyllable}/;
+    print "ok 747\n";
+}
+
+{
+    # Script=, Block=, Category=
+
+    print "not " unless "\x{0100}" =~ /\p{Script=Latin}/;
+    print "ok 748\n";
+
+    print "not " unless "\x{0100}" =~ /\p{Block=LatinExtendedA}/;
+    print "ok 749\n";
+
+    print "not " unless "\x{0100}" =~ /\p{Category=UppercaseLetter}/;
+    print "ok 750\n";
+}
+
+{
+    print "# the basic character classes and Unicode \n";
+
+    # 0100;LATIN CAPITAL LETTER A WITH MACRON;Lu;0;L;0041 0304;;;;N;LATIN CAPITAL LETTER A MACRON;;;0101;
+    print "not " unless "\x{0100}" =~ /\w/;
+    print "ok 751\n";
+
+    # 0660;ARABIC-INDIC DIGIT ZERO;Nd;0;AN;;0;0;0;N;;;;;
+    print "not " unless "\x{0660}" =~ /\d/;
+    print "ok 752\n";
+
+    # 1680;OGHAM SPACE MARK;Zs;0;WS;;;;;N;;;;;
+    print "not " unless "\x{1680}" =~ /\s/;
+    print "ok 753\n";
+}
+
+{
+    print "# folding matches and Unicode\n";
+
+    print "not " unless "a\x{100}" =~ /A/i;
+    print "ok 754\n";
+
+    print "not " unless "A\x{100}" =~ /A/i;
+    print "ok 755\n";
+
+    print "not " unless "a\x{100}" =~ /a/i;
+    print "ok 756\n";
+
+    print "not " unless "A\x{100}" =~ /A/i;
+    print "ok 757\n";
 }