about summary refs log tree commit diff
path: root/Test/D06subscript.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/D06subscript.ztst')
-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]"