summaryrefslogtreecommitdiff
path: root/t/op/pat.t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-02-28 05:50:24 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-02-28 05:50:24 +0000
commit85fd1718f1ef3f9bfa065f982148888889ad4fcd (patch)
tree29ce1efff93c107d95dcbfeb44c3510fc8545ad7 /t/op/pat.t
parente05949c7fbf3ae0363947bc70c1c662248b91b93 (diff)
downloadperl-85fd1718f1ef3f9bfa065f982148888889ad4fcd.tar.gz
Tests for #14908.
p4raw-id: //depot/perl@14909
Diffstat (limited to 't/op/pat.t')
-rwxr-xr-xt/op/pat.t19
1 files changed, 18 insertions, 1 deletions
diff --git a/t/op/pat.t b/t/op/pat.t
index 86025d1fa6..b3db7ded17 100755
--- a/t/op/pat.t
+++ b/t/op/pat.t
@@ -6,7 +6,7 @@
$| = 1;
-print "1..855\n";
+print "1..858\n";
BEGIN {
chdir 't' if -d 't';
@@ -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++;
+ }
+}