about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-07-31 13:53:28 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-07-31 13:53:28 +0000
commitdc72699b6c400e530b818250c943587b3ecf663e (patch)
tree494587e43ea98b81bb6cecfb1fe3b70eaa0cf7ac /Test
parent0c9830d23c87ad2a572d2c6d16b13a34001b9634 (diff)
downloadzsh-dc72699b6c400e530b818250c943587b3ecf663e.tar.gz
zsh-dc72699b6c400e530b818250c943587b3ecf663e.tar.xz
zsh-dc72699b6c400e530b818250c943587b3ecf663e.zip
25364: fix k flag in hash subscript
Diffstat (limited to 'Test')
-rw-r--r--Test/D06subscript.ztst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Test/D06subscript.ztst b/Test/D06subscript.ztst
index 4cb814977..cffca742e 100644
--- a/Test/D06subscript.ztst
+++ b/Test/D06subscript.ztst
@@ -145,6 +145,16 @@
 >\2 backcbrack cbrack star
 >\\\4 \\\? star zounds
 
+# It doesn't matter which element we get, since we never guarantee
+# ordering of an associative array.  So just test the number of matches.
+  array=(${(o)A[(k)\]]})
+  print ${#array}
+  array=(${(o)A[(k)\\\]]})
+  print ${#array}
+0:Associative array keys interpreted as patterns, single match
+>1
+>1
+
   typeset -g "A[one\"two\"three\"quotes]"=QQQ
   typeset -g 'A[one\"two\"three\"quotes]'=qqq
   print -R "$A[one\"two\"three\"quotes]"