diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2017-09-30 13:35:19 +0100 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2017-10-01 17:53:56 +0100 |
commit | 728f2adfc8daf2c65c5d4130a903635a58c99fb5 (patch) | |
tree | c2863d7a40bbdbe630ebb7ad1e50e996af568a79 /Test | |
parent | a1276c88e1137c643bb8055d719afc17cb37bf0f (diff) | |
download | zsh-728f2adfc8daf2c65c5d4130a903635a58c99fb5.tar.gz zsh-728f2adfc8daf2c65c5d4130a903635a58c99fb5.tar.xz zsh-728f2adfc8daf2c65c5d4130a903635a58c99fb5.zip |
Add typeset -p1, like typeset -p with newlines
Diffstat (limited to 'Test')
-rw-r--r-- | Test/B02typeset.ztst | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Test/B02typeset.ztst b/Test/B02typeset.ztst index 13f0d5e30..996af064f 100644 --- a/Test/B02typeset.ztst +++ b/Test/B02typeset.ztst @@ -793,3 +793,29 @@ local -A keyvalhash=(1 one [2]=two 3 three) 1:Mixed syntax with [key]=val not allowed for hash. ?(eval):1: bad [key]=value syntax for associative array + + local -a myarray + typeset -p1 myarray + myarray=("&" sand '""' "" plugh) + typeset -p1 myarray +0:typeset -p1 output for array +>typeset -a myarray=() +>typeset -a myarray=( +> '&' +> sand +> '""' +> '' +> plugh +>) + + local -A myhash + typeset -p1 myhash + myhash=([one]=two [three]= [four]="[]") + typeset -p1 myhash +0:typeset -p1 output for associative array +>typeset -A myhash=() +>typeset -A myhash=( +> [four]='[]' +> [one]=two +> [three]='' +>) |