Lines Matching refs:foo
38 nameref foo=p
39 if [[ ${foo.x} != ${Point.x} ]]
42 unset foo
64 x=( [foo]=bar )
68 unset -n foo x
69 unset foo x
70 foo=( x=3)
71 nameref x=foo
72 if [[ ${!x.@} != foo.x ]]
79 x.foo.bar=7
80 [[ ${x.foo.bar} == 7 ]] || err_exit '[[ ${x.foo.bar} != 7 ]]'
81 (( x.foo.bar == 7 ))|| err_exit '(( x.foo.bar != 7 ))'
82 [[ ${x.foo} == *bar=7* ]] || err_exit '[[ ${x.foo} != *bar=7* ]]'
84 foo=(integer x=3)
85 if [[ ${foo} != *x=3* ]]
90 unset foo
91 [[ ${!foo.@} ]] && err_exit 'unset compound variable leaves subvariables'
184 foo=( bar=foo barbar=bar)
185 [[ $foo == *bar=foo* ]] || err_exit 'no prefix elements in compound variable output'
213 ( [[ ${z.foo.bar:-abc} == abc ]] 2> /dev/null) || err_exit ':- not working with compound variables'
215 typeset -a stack.items=([0]=foo [1]=bar)
216 [[ ${stack.items[0]} == foo ]] || err_exit 'typeset -a variable not expanding correctly'
218 x=(foo=([1]=(y=([2]=(z=4)))))
222 function foo function
228 a=( b=$(foo) )
232 .sh.value=foo
235 [[ ${b.b1} == foo ]] || err_exit '${b.b1} should be foo'
263 X=( foo=1 )
266 unset foo
267 typeset -A foo=([a]=aa;[b]=bb;[c]=cc)
268 [[ ${foo[c]} == cc ]] || err_exit 'associative array assignment with; not working'
270 unset foo
271 foo=(typeset -a bar)
272 [[ $foo == *'typeset -a bar'* ]] || err_exit 'array attribute -a not preserved in compound variabl…
274 typeset -A s=( [foo]=(y=2 z=3) [bar]=(y=4 z=5))
280 unset foo
281 typeset -C foo
282 foo.bar=abc
283 [[ $foo == $'(\n\tbar=abc\n)' ]] || err_exit 'typeset -C not working for foo'
284 typeset -C foo=(bar=def)
285 [[ $foo == $'(\n\tbar=def\n)' ]] || err_exit 'typeset -C not working when initialized'
286 foo=(
292 eval foo2="$foo"
300 "$foo"
305 [[ $bar == "$foo" ]] || err_exit '$foo != $bar'
308 typeset x=( typeset -a foo=( [1][3]=hello [9][2]="world" ) )
321 x=( float x=0 y=1; z=([foo]=abc [bar]=def))
336 z=(foo=abc)
338 [[ $y == *foo=abc* ]] || err_exit 'z not appended to y'
339 unset y.foo
342 x=( foo=(z=abc d=ghi) bar=abc; typeset -A r=([x]=3 [y]=4))
349 z.foo=( [one]=hello [two]=(x=3 y=4) [three]=hi)
426 typeset -C -A hello=( [foo]=bar)
431 function foo function
437 foo 2> /dev/null <<- \EOF || err_exit 'deleting compound variable in function failed'
440 [a]=( foo=bar)
441 [b]=( foo=bar)
442 [c d]=( foo=bar)
443 [e]=( foo=bar)
444 [f]=( foo=bar)
445 [g]=( foo=bar)
446 [h]=( foo=bar)
447 [i]=( foo=bar)
448 [j]=( foo=bar)