diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2017-09-23 18:17:51 +0100 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2017-09-24 17:33:07 +0100 |
commit | 85b0dd71335c8ee6d4925be6b590cbe643edf196 (patch) | |
tree | 227a562b08a3a8b5a01e1b802533a844d1fa5fbd /Test/D04parameter.ztst | |
parent | 8ddadb8afe819951891f30cfbf5061af56a231e9 (diff) | |
download | zsh-85b0dd71335c8ee6d4925be6b590cbe643edf196.tar.gz zsh-85b0dd71335c8ee6d4925be6b590cbe643edf196.tar.xz zsh-85b0dd71335c8ee6d4925be6b590cbe643edf196.zip |
Updates for ksh array element syntax.
Move detection of key/value pairs down into prefork(). Detect normal array assignment and [key]=val array assignemnt separately. Mark key / value pairs with Marker and pass up flag. Deal with marked triads specially later on.
Diffstat (limited to 'Test/D04parameter.ztst')
-rw-r--r-- | Test/D04parameter.ztst | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index 367bca120..abac8f7a0 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -2275,3 +2275,30 @@ F:behavior, see http://austingroupbugs.net/view.php?id=888 >third value >4fourth element\ >fourth value + + local keyvalarray + keyvalarray=(first [2]=second third [6]=sixth seventh [5]=fifth new_sixth) + print -l "${keyvalarray[@]}" +0:mixed syntax [key]=val with normal arrays +>first +>second +>third +> +>fifth +>new_sixth +>seventh + + local -A keyvalhash + keyvalhash=(1 one [2]=two 3 three) +1:Mixed syntax with [key]=val not allowed for hash. +?(eval):2: bad [key]=value syntax for associative array + + touch KVA1one KVA2two KVA3three + local keyvalarray + keyvalarray=(KVA* [4]=*) + print -l "${keyvalarray[@]}" +0:Globbing in non-[key]=val parts of mixed syntax. +>KVA1one +>KVA2two +>KVA3three +>* |