Lines Matching refs:foo

90 x=$(foo=abc $SHELL <<!
91 foo=bar
92 $SHELL -c 'print \$foo'
104 readonly $a=foo
105 if [[ $b != foo ]]
135 unset -f foo
136 function foo
143 foo 1
147 foo
153 unset foo
154 foo=bar
155 if [[ $(export | grep ^foo=) != 'foo=bar' ]]
158 unset foo
159 read foo <<!
162 if [[ $(export | grep ^foo=) != 'foo=bar' ]]
213 [[ $($SHELL -c 'unset foo;typeset -Z2 foo; print ${foo:-3}' 2> /dev/null) == 3 ]] || err_exit '${foo:-3} not 3 when typeset -Z2 field undefined'
214 [[ $($SHELL -c 'unset foo;typeset -Z2 foo; print ${foo:=3}' 2> /dev/null) == 03 ]] || err_exit '${foo:=-3} not 3 when typeset -Z2 foo undefined'
215 unset foo bar
219 export foo=hello
221 [[ $foo == hello ]] || err_exit 'export scoping problem in function'
224 [[ $(export | grep foo) == 'foo=hello' ]] || err_exit 'export not working in functions'
250 foo=bar
265 foo=abc
266 x='typeset -n z=foo'
271 unset foo z
282 function foo
287 [[ $(foo) == bar=xxx ]] || err_exit 'typeset -p not working inside a function'
288 unset foo
289 typeset -L5 foo
290 [[ $(typeset -p foo) == 'typeset -L 5 foo' ]] || err_exit 'typeset -p not working for variables with attributes but without a value'
292 typeset -L3 foo=aaa
293 typeset -L6 foo=bbbbbb
294 [[ \$foo == bbbbbb ]]
298 typeset -R3 foo=aaa
299 typeset -R6 foo=bbbbbb
300 [[ \$foo == bbbbbb ]]
305 unset foo
306 typeset -b -Z10 foo
307 read foo <<< 'abcdefghijklmnop'
308 [[ $foo == "$expected" ]] || err_exit 'read foo, where foo is "typeset -b -Z10" not working'
309 unset foo
310 typeset -b -Z10 foo
311 read -N10 foo <<< 'abcdefghijklmnop'
312 [[ $foo == "$expected" ]] || err_exit 'read -N10 foo, where foo is "typeset -b -Z10" not working'
313 unset foo
314 typeset -b -A foo
315 read -N10 foo[4] <<< 'abcdefghijklmnop'
316 [[ ${foo[4]} == "$expected" ]] || err_exit 'read -N10 foo, where foo is "typeset -b -A" foo not working'
317 unset foo
318 typeset -b -a foo
319 read -N10 foo[4] <<< 'abcdefghijklmnop'
320 [[ ${foo[4]} == "$expected" ]] || err_exit 'read -N10 foo, where foo is "typeset -b -a" foo not working'
321 [[ $(printf %B foo[4]) == abcdefghij ]] || err_exit 'printf %B for binary associative array element not working'
322 [[ $(printf %B foo[4]) == abcdefghij ]] || err_exit 'printf %B for binary indexed array element not working'
323 unset foo
325 $SHELL 2> /dev/null -c 'export foo=(bar=3)' && err_exit 'compound variables cannot be exported'
348 "$EDT $PDT $EDT" "foo=bar" "TZ=$PTZ" "TZ=$ETZ" \