summaryrefslogtreecommitdiff
path: root/tests/assoc5.sub
blob: 400f3d3945a8e7c67e8ba1d36fd93a38169db9f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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=