1 # testing behavior of command substitution as one of expansions performed by
2 # array subscripting; should behave the same directly as when done through
7 f() { typeset -n foo="$1"; declare -p foo; echo "$foo"; }
21 echo "x[i=0$(echo comsub >&2)]"
22 echo "${x[i=0$(echo comsub >&2)]}"
27 f 'x[i=0$(echo comsub >&2)]'
32 # problems with unset and namerefs pointing to non-existent variables pointed
33 # out after bash-4.3 released
35 typeset -n foo=somevariable
37 unset foo # unsets somevariable
38 typeset -p foo somevariable
41 typeset -A foo # should create array variable named somevariable
44 typeset -p foo somevariable
45 typeset -A foo='([jug]="brown" )'
46 typeset -p foo somevariable
49 typeset -p foo somevariable
51 typeset -p foo somevariable