Lines Matching refs: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} ]]
55 .foo.bar=next
56 checkref .foo.bar .foo.bar
57 if [[ ${.foo.bar} != hello ]]
60 if [[ ${.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'
245 function bar
253 bar var