diff options
Diffstat (limited to '')
-rw-r--r-- | tests/assoc5.sub | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/assoc5.sub b/tests/assoc5.sub new file mode 100644 index 0000000..400f3d3 --- /dev/null +++ b/tests/assoc5.sub @@ -0,0 +1,27 @@ +declare -A myarray + +# this needs fixes to skipsubscript +myarray["a]a"]="abc" + +echo ${myarray["a]a"]} + +myarray[$(echo ])]=def + +echo ${myarray[']']} +echo ${myarray[\]]} + +declare myarray["foo[bar"]=bleh +myarray["foo"]=bleh + +echo "${myarray[@]}" + +bar='a]=test1;#a' +myarray[$bar]=123 + +set | grep ^myarray= +echo ${myarray[a]} + +echo "${myarray['a]=test1;#a']}" +myarray['a]=test2;#a']="def" + +set | grep ^myarray= |