Integrate mainline - all tests pass - some noise from threads
[p5sagit/p5-mst-13.2.git] / t / op / pat.t
index 00ea74f..b3db7de 100755 (executable)
@@ -6,7 +6,7 @@
 
 $| = 1;
 
-print "1..855\n";
+print "1..858\n";
 
 BEGIN {
     chdir 't' if -d 't';
@@ -2290,7 +2290,7 @@ print "# some Unicode properties\n";
     print "not " unless "a\x{100}" =~ /A/i;
     print "ok 754\n";
 
-    print "not " unless "A\x{100}" =~ /A/i;
+    print "not " unless "A\x{100}" =~ /a/i;
     print "ok 755\n";
 
     print "not " unless "a\x{100}" =~ /a/i;
@@ -2314,7 +2314,7 @@ print "# some Unicode properties\n";
     print "not " unless "a\x{100}" =~ /A\x{100}/i;
     print "ok 762\n";
 
-    print "not " unless "A\x{100}" =~ /A\x{100}/i;
+    print "not " unless "A\x{100}" =~ /a\x{100}/i;
     print "ok 763\n";
 
     print "not " unless "a\x{100}" =~ /a\x{100}/i;
@@ -2326,7 +2326,7 @@ print "# some Unicode properties\n";
     print "not " unless "a\x{100}" =~ /[A]/i;
     print "ok 766\n";
 
-    print "not " unless "A\x{100}" =~ /[A]/i;
+    print "not " unless "A\x{100}" =~ /[a]/i;
     print "ok 767\n";
 
     print "not " unless "a\x{100}" =~ /[a]/i;
@@ -2689,3 +2689,20 @@ print "# some Unicode properties\n";
 
     print $x eq "x b x" ? "ok 855\n" : "not ok 855\n";
 }
+
+{
+    print "# UTF-8 hash keys and /\$/\n";
+    # http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2002-01/msg01327.html
+
+    my $u = "a\x{100}";
+    my $v = substr($u,0,1);
+    my $w = substr($u,1,1);
+    my %u = ( $u => $u, $v => $v, $w => $w );
+    my $i = 856; 
+    for (keys %u) {
+       my $m1 = /^\w*$/ ? 1 : 0;
+       my $m2 = $u{$_}=~/^\w*$/ ? 1 : 0;
+       print $m1 == $m2 ? "ok $i\n" : "not ok $i # $m1 $m2\n";
+       $i++;
+    }
+}