Searched refs:foo (Results 1 - 25 of 37) sorted by relevance

12

/ast/src/cmd/ksh93/tests/
H A Dcase.sh32 bam=foo[3]
34 do foo=0
36 foo1) foo=1;;
37 $bar) foo=2;;
38 $bam) foo=3;;
39 foo[4]) foo=4;;
41 foo=5;;
43 foo=6;;
45 if [[ $i != foo
[all...]
H A Dselect.sh37 1) foo
42 select i in foo bar bam
44 foo) break;;
53 select i in foo bar bam
55 foo) err_exit "select foo not working" 2>&3
57 *) if [[ $REPLY != foo ]]
64 foo
H A Darrays.sh89 unset foo
90 if (( ${#foo[@]} != 0 ))
91 then err_exit 'number of elements of unset variable foo is not 0'
93 foo=''
94 if (( ${#foo[0]} != 0 ))
97 if (( ${#foo[@]} != 1 ))
98 then err_exit 'number of elements of null variable foo is not 1'
100 unset foo
101 foo[0]=foo
[all...]
H A Dalias.sh34 alias foo='print hello'
35 if [[ $(foo) != hello ]]
36 then err_exit 'foo, where foo is alias for "print hello" failed'
38 if [[ $(foo world) != 'hello world' ]]
39 then err_exit 'foo world, where foo is alias for "print hello" failed'
41 alias foo='print hello '
43 if [[ $(foo bar) != 'hello world' ]]
44 then err_exit 'foo ba
[all...]
H A Dquoting2.sh75 x=$((echo foo)|(cat))
76 if [[ $x != foo ]]
101 set -- ${x+foo bar bam}
103 then err_exit '${x+foo bar bam} does not yield three arguments'
105 set -- ${x+foo "bar bam"}
107 then err_exit '${x+foo "bar bam"} does not yield two arguments'
109 set -- ${x+foo 'bar bam'}
111 then err_exit '${x+foo '\''bar bam'\''} does not yield two arguments'
113 set -- ${x+foo $x bam}
115 then err_exit '${x+foo
[all...]
H A Dattributes.sh90 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 function
143 foo 1
147 foo
153 unset foo
284 function foo function
[all...]
H A Dreturn.sh38 foo=NOVAL bar=NOVAL
40 function foo function
42 typeset foo=NOEXIT
43 trap "foo=EXIT;rm -f $file" EXIT
66 [[ $foo == EXIT ]] || err_exit "foo "$@" : exit trap not set"
69 err_exit "foo $@: doesn't remove $file"
71 foo=NOVAL bar=NOVAL
89 foo 0 0 || err_exit "foo
[all...]
H A Dnameref.sh36 nameref foo=$1 bar=$2
37 if [[ $foo != $bar ]]
38 then err_exit "foo=$foo != bar=$bar"
40 foo=hello
41 if [[ $foo != $bar ]]
42 then err_exit "foo=$foo != bar=$bar"
44 foo.child=child
45 if [[ ${foo
250 function foo function
[all...]
H A Dappend.sh54 aarray+=( [2]=2 [3]=3 [foo]=bar )
69 unset foo
70 foo=one
71 foo+=(two)
72 if [[ ${foo[@]} != 'one two' ]]
75 unset foo
76 foo[0]=(x=3)
77 foo+=(x=4)
78 [[ ${foo[1].x} == 4 ]] || err_exit 'compound append to index array not working'
79 [[ ${foo[
[all...]
H A Dcomvar.sh38 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
222 function foo function
431 function foo function
[all...]
H A Dfunctions.sh39 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 ]]
118 function foo function
155 function foo function
184 function foo function
189 function foo function
206 function foo function
349 function foo function
774 function foo function
876 function foo function
904 function foo function
1022 function foo function
1066 function foo function
1081 function foo function
1104 function foo function
1140 function foo function
1160 function foo function
1183 function foo function
1195 function foo function
[all...]
H A Dnamespace.sh34 foo=abc
40 print global fn $foo
44 print global fun $foo
50 print xfun global $foo
56 print xfun local $foo
68 foo=bar
73 print local fn $foo
94 [[ $(runrun $foo) == 'local prog bar' ]] || err_exit 'local binary on PATH failed'
102 [[ $(run $foo) == 'global prog abc' ]] || err_exit 'global binary on PATH failed'
H A Dquoting.sh74 x=$((echo foo)|(cat))
75 if [[ $x != foo ]]
100 set -- ${x+foo bar bam}
102 then err_exit '${x+foo bar bam} does not yield three arguments'
104 set -- ${x+foo "bar bam"}
106 then err_exit '${x+foo "bar bam"} does not yield two arguments'
108 set -- ${x+foo 'bar bam'}
110 then err_exit '${x+foo '\''bar bam'\''} does not yield two arguments'
112 set -- ${x+foo $x bam}
114 then err_exit '${x+foo
[all...]
H A Dbasic.sh87 print hi > .foo
105 if (command > foo\\abc) 2> /dev/null
106 then set -- foo*
107 if [[ $1 != 'foo\abc' ]]
108 then err_exit 'foo* does not match foo\abc'
126 bar=foo
127 eval foo=\$bar
128 if [[ $foo != foo ]]
312 foo() function
[all...]
H A Dsubstring.sh30 base=/home/dgk/foo//bar
92 if [[ "${string1#@(*/bar|*/foo)}" != //bar/abcabcabc ]]
93 then err_exit "string1#@(*/bar|*/foo)"
95 if [[ ${string1##@(*/bar|*/foo)} != /abcabcabc ]]
96 then err_exit "string1##@(*/bar|*/foo)"
98 if [[ ${string1##*/@(bar|foo)} != /abcabcabc ]]
99 then err_exit "string1##*/@(bar|foo)"
101 foo=abc
102 if [[ ${foo#a[b*} != abc ]]
105 if [[ ${foo//[
615 function foo function
[all...]
H A Dvariables.sh117 nameref foo=${.sh.name}.save
118 foo=${.sh.value}
127 nameref foo=${.sh.name}.save
128 .sh.value=$foo
134 typeset +n foo
135 unset foo
136 foo=bar
138 unset foo
140 if [[ $foo != '' ]]
141 then err_exit '$foo no
177 function foo.get function
427 function foo function
554 function foo.set function
[all...]
H A Denum.sh45 y[foo]=yellow
46 [[ ${y[foo]} == yellow ]] || err_exit '${y[foo]} != yellow'
47 (( y[foo] == 4 )) || err_exit '(( y[foo] != 4))'
69 arr[green]=foo
H A Dgrep.sh92 to see how many lines find both foo and bar.
93 Some line contain foo only,
95 However, many lines contain both foo and also bar.
97 There should be six lines with foo and bar.
98 There are only two line with out foo but with bar.
101 if (( $(grep -c 'foo*bar' $tmp/grep ) != 6))
H A Dsubshell.sh38 z.foo=( [one]=hello [two]=(x=3 y=4) [three]=hi)
51 typeset -A foo=(
67 z.foo[three]=good
68 [[ ${z.foo[three]} == good ]] || err_exit 'associative array assignment in subshell not working'
73 z.foo[two]=ok
74 [[ ${z.foo[two]} == ok ]] || err_exit 'associative array assignment to compound variable in subshell not working'
81 foo=( qqq=abc rrr=def)
86 unset x.foo
87 [[ ${x.foo.qqq} ]] && err_exit 'x.foo
238 function foo function
525 function foo function
[all...]
H A Dtypes.sh62 function foo function
69 foo r.y y
72 foo y r.y
90 typeset -A arr=([foo]=one [bar]=2)
91 typeset -A brr=([foo]=one [bar]=2)
108 typeset -m brr[foo]=brr[bar]
109 [[ ${brr[foo]} == 2 ]] || err_exit 'move an associative array element fails'
125 typeset x=foo y=bar
133 [[ ${x.x} == foo ]] || err_exit 'x.x should be foo'
[all...]
H A Dtilde.sh95 [[ ~/foo == /foo ]] || err_exit '~/foo should be /foo when ~==/'
99 [[ $($tmp/tilde foo) == "$PWD$nl$PWD" ]] 2> /dev/null || err_exit 'tilde fails inside a script run by name'
H A Dbracket.sh107 if [[ foo < bar ]]
108 then err_exit "foo comes before bar"
203 [[ foo > bar ]]
204 } 2> /dev/null || { set +x; err_exit "foo<bar with -x enabled" ;}
298 foo=([1]=a [2]=b [3]=c)
299 [[ -v foo[1] ]] || err_exit 'foo[1] should be set'
300 [[ ${foo[1]+x} ]] || err_exit '${foo[1]+x} should be x'
301 [[ ${foo[
[all...]
H A Dbuiltins.sh36 : ${foo=bar} || err_exit ": failed"
37 [[ $foo == bar ]] || err_exit ": side effects failed"
42 getopts :x: foo || err_exit "getopts :x: returns false"
43 [[ $foo == x && $OPTARG == foobar ]] || err_exit "getopts :x: failed"
73 false ${foo=bar} && err_exit "false failed"
143 if [[ $( for i in foo bar
147 ) != $'foo\nbar' ]]
157 do if [[ $( for i in foo
161 ) != foo ]]
174 if [[ $(abc: for i in foo ba
[all...]
H A Darith.sh319 if [[ $(print x$((10))=foo) != x10=foo ]]
320 then err_exit 'parsing error with x$((10))=foo'
322 $SHELL -c 'typeset x$((10))=foo' 2> /dev/null || err_exit 'typeset x$((10)) parse error'
385 (( obj.foo = 1 ))
387 (( obj.baz = obj.foo + obj.bar )) # ok
391 (( obj.faz = faz = obj.foo + obj.bar )) # ok
411 echo $(( obj.baz = obj.foo + obj.bar )) # coredump
414 echo $(( obj.foo + obj.bar )) # coredump
420 [[ $($tmp/script 1) != '( bar=2 baz=3 foo
[all...]
H A Dcoprocess.sh233 print foo >&p 2> /dev/null || err_exit "first write of foo to $cat coprocess failed"
234 print foo >&p 2> /dev/null || err_exit "second write of foo to coprocess failed"
245 print -p foo
248 [[ $REPLY == foo ]] || err_exit "first REPLY from $cat coprocess is $REPLY not foo"

Completed in 84 milliseconds

12