Lines Matching defs:bar

36 	nameref foo=$1 bar=$2
37 if [[ $foo != $bar ]]
38 then err_exit "foo=$foo != bar=$bar"
41 if [[ $foo != $bar ]]
42 then err_exit "foo=$foo != bar=$bar"
45 if [[ ${foo.child} != ${bar.child} ]]
46 then err_exit "foo.child=${foo.child} != bar=${bar.child}"
55 .foo.bar=next
56 checkref .foo.bar .foo.bar
57 if [[ ${.foo.bar} != hello ]]
58 then err_exit ".foo.bar=${.foo.bar} != hello"
60 if [[ ${.foo.bar.child} != child ]]
61 then err_exit ".foo.bar.child=${.foo.bar.child} != child"
83 nameref x=.foo.bar
84 if [[ ${!x} != .foo.bar ]]
89 nameref x=.foo.bar
94 if [[ $(.foo.bar.set) != $(x.set) ]]
100 if [[ $(typeset -n) != x=.foo.bar ]]
104 typeset +n foo bar 2> /dev/null
105 unset foo bar
106 export bar=foo
107 nameref foo=bar
123 typeset +n foo bar
124 unset foo bar
126 nameref bar=$1
128 if [[ $bar != hello ]]
131 unset foo bar
132 bar=123
135 typeset -n foo=bar
136 typeset -n foo=bar
164 unset -n x foo bar
165 if [[ $(nameref x=foo;for x in foo bar;do print ${!x};done) != $'foo\nbar' ]]
179 var=(foo=bar)
190 nameref var=arg.bar
193 foo=( integer bar=0)
195 (( foo.bar == 5)) || err_exit 'nested nameref not working'
232 unset -n foo bar
235 nameref bar=foo[x.y]
236 [[ ${bar.x} == 3 ]] || err_exit 'nameref to subscript containing . fails'
237 [[ ${!bar} == 'foo[x.y]' ]] || err_exit '${!var} not correct for nameref to an array instance'
238 typeset +n bar
239 nameref bar=foo
240 [[ ${!bar} == foo ]] || err_exit '${!var} not correct for nameref to array variable'
241 $SHELL -c 'function bar { nameref x=foo[++];};typeset -A foo;bar' 2> /dev/null ||err_exit 'nameref of associative array tries to evaluate subscript'
242 i=$($SHELL -c 'nameref foo=bar; bar[2]=(x=3 y=4); nameref x=foo[2].y;print -r -- $x' 2> /dev/null)
245 function bar
253 bar var
284 typeset +n bar
285 unset foo bar
288 for i in foo bar
293 foo=1 bar=2;a) == $'1\n2' ]] 2> /dev/null || err_exit 'nameref in pipeline broken'
306 foo[2]=bar
309 [[ $zip == bar ]] || err_exit 'nameref to another nameref to array element fails'
341 nameref bar=doc.num
342 [[ $bar == 2 ]] || err_exit 'nameref scoping error'