summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xt/op/each.t14
1 files changed, 13 insertions, 1 deletions
diff --git a/t/op/each.t b/t/op/each.t
index 879c0d0fd3..4a00a1e2c5 100755
--- a/t/op/each.t
+++ b/t/op/each.t
@@ -1,6 +1,6 @@
#!./perl
-print "1..19\n";
+print "1..20\n";
$h{'abc'} = 'ABC';
$h{'def'} = 'DEF';
@@ -131,3 +131,15 @@ if ($i == 5) { print "ok 16\n" } else { print "not ok\n" }
print "ok 19\n";
}
+# Check for Unicode hash keys.
+%u = ("\x{12}", "f", "\x{123}", "fo", "\x{1234}", "foo");
+$u{"\x{12345}"} = "bar";
+@u{"\x{123456}"} = "zap";
+
+foreach (keys %u) {
+ unless (length() == 1) {
+ print "not ";
+ last;
+ }
+}
+print "ok 20\n";