summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2017-09-14 21:43:37 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2017-09-14 21:43:37 +0100
commitab7be4238ca89b5dca482a1c3b3fd013b105750e (patch)
treed22e18887769a111c1e6597f6bd33dc136439e55 /Test
parent7ca2e97c14cd7927c1ee688880884a2bd152fc68 (diff)
downloadzsh-ab7be4238ca89b5dca482a1c3b3fd013b105750e.tar.gz
zsh-ab7be4238ca89b5dca482a1c3b3fd013b105750e.tar.xz
zsh-ab7be4238ca89b5dca482a1c3b3fd013b105750e.zip
More [key]=value tweaks
Some rephrasings.

Update typeset -p for associative arrays to use new syntax.
Diffstat (limited to 'Test')
-rw-r--r--Test/B02typeset.ztst2
-rw-r--r--Test/V10private.ztst2
2 files changed, 3 insertions, 1 deletions
diff --git a/Test/B02typeset.ztst b/Test/B02typeset.ztst
index ae218047c..7923ae3a6 100644
--- a/Test/B02typeset.ztst
+++ b/Test/B02typeset.ztst
@@ -763,6 +763,7 @@
  for key in ${(ok)keyvalhash}; do
    print -l $key $keyvalhash[$key]
  done
+ typeset -p keyvalhash
 0:Substitution in [key]=val syntax
 >*
 >?not_globbed?
@@ -776,3 +777,4 @@
 >another value
 >the key
 >the value
+>typeset -A keyvalhash=( ['*']='?not_globbed?' ['another key']='another value' ['the key']='the value' )
diff --git a/Test/V10private.ztst b/Test/V10private.ztst
index 78ecd48ea..880784e12 100644
--- a/Test/V10private.ztst
+++ b/Test/V10private.ztst
@@ -123,7 +123,7 @@
  print ${(kv)hash_test}
 0:private hides value from surrounding scope in nested scope
 >typeset -a hash_test=( top level )
->typeset -A hash_test=( in function )
+>typeset -A hash_test=( [in]=function )
 >typeset -g -a hash_test=( top level )
 >array-local top level
 >top level