diff options
Diffstat (limited to 'tests/assoc6.sub')
-rw-r--r-- | tests/assoc6.sub | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/tests/assoc6.sub b/tests/assoc6.sub new file mode 100644 index 0000000..54112ee --- /dev/null +++ b/tests/assoc6.sub @@ -0,0 +1,146 @@ +declare -A foo + +foo=([bar\"bie]=doll) + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo=(["bar\"bie"]="doll") + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo=(["bar\"bie"]="doll") + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo["bar\"bie"]="doll" + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo[bar\"bie]="doll" + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo=([bar\'bie]=doll) + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo=(["bar'bie"]="doll") + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo=(["bar'bie"]="doll") + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo["bar'bie"]="doll" + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo[bar\'bie]="doll" + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo=([bar\$bie]=doll) + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo=(["bar[bie"]="doll") + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo=(["bar\`bie"]="doll") + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +# this doesn't work right without the backslash +foo["bar\]bie"]="doll" + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo + +foo[bar\${foo}bie]="doll" + +echo ${!foo[@]} +echo ${foo[@]} + +declare -p foo + +unset foo +declare -A foo |