Lines Matching defs:foo

39 integer foo=33
45 1) print -r - "$foo" "$bar";;
47 3) typeset foo=foo
49 print -r - "$foo" "$bar";;
50 4) trap 'foo=36' EXIT
51 typeset foo=20;;
71 if [[ $(bar=foo foobar 1) != '33 foo' ]]
74 if [[ $bar == foo ]]
78 if [[ $(foobar 3) != 'foo 10' ]]
83 if [[ $foo != 36 ]]
117 unset -f foo
118 function foo
132 if [[ $(foo) != bar ]]
155 function foo
159 foo
184 function foo
189 function foo
193 if [[ $(foo) != bar ]]
197 if [[ $(foo) != hello ]]
200 unset -f foo bar
206 function foo
212 if [[ $(foo) != 3 ]]
219 print foo
225 if [[ $(foobar 2>/dev/null) != foo ]]
349 function foo
354 if [[ $(foo)$(foo) != ABCABC ]]
764 print -r -- "$foo$bar"
770 unset foo bar
771 [[ $(foo=hello g) == hellobam ]] || err_exit 'function exports not passed on'
773 unset -f foo
774 function foo
789 [[ $(foo 'NUMBERED RECORDSIZE') == ok ]] || err_exit 'optimization error with undefined variable'
876 function foo
882 foo
904 function foo
906 typeset xyz=foo
920 foo $LINENO
960 [[ $* == 'foo bar' ]] || err_exit "args are '$*', not 'foo bar'"
979 . $tmp/debug foo bar
993 ( $SHELL -c ' function foo { typeset x=$1;print $1;};z=();z=($(foo bar)) ') 2> /dev/null || err_exit 'using a function to set an array in a command sub fails'
1022 function foo
1029 foo
1035 print foo
1050 ) == foo ]] > /dev/null || err_exit 'functions compiled with shcomp not working'
1052 print $'print hello\nprint world' > $tmp/foo
1053 ${SHCOMP:-${SHELL%/*}/shcomp} $tmp/foo > $tmp/foo.sh
1054 val=$(. $tmp/foo.sh)
1057 unset -f foo foobar bar
1061 cat > foo <<- \EOF
1066 function foo
1071 chmod +x foo
1072 : $(foo)
1073 [[ $(typeset +f) == *foo* ]] && err_exit 'function in subshell leaving side effect of function foo'
1074 unset -f foo bar
1075 : $(foo)
1076 [[ $(typeset +f) == *foo* ]] && err_exit 'function in subshell leaving side effects of function foo after reload'
1079 unset -f foo
1081 function foo
1086 foo sub
1104 function foo
1112 foo
1140 function foo
1143 unset -f foo
1146 foo
1148 } 2> /dev/null || err_exit 'problem with unset -f foo within function foo'
1160 function foo
1166 i) [[ $OPTARG == foobar ]] || err_exit 'OPTARG should be set to foobar in function foo';;
1170 (( OPTIND == 4 )) || err_exit "OPTIND is $OPTIND at end of function foo; it should be 4"
1171 [[ $1 == foo2 ]] || err_exit "\$1 is $1, not foo after getopts in function"
1174 foo -h -i foobar foo2
1179 then function foo { getopts --man; }
1180 [[ $(typeset -f foo) == 'function foo { getopts --man; }' ]] || err_exit 'typeset -f not work for function with getopts'
1183 function foo
1191 do foo ${invals[i]}
1195 function foo
1205 foo 2> /dev/null