/ast/src/cmd/ksh93/tests/ |
H A D | alias.sh | 42 alias bar=world 43 if [[ $(foo bar) != 'hello world' ]] 44 then err_exit 'foo bar, where foo is alias for "print hello " failed' 46 if [[ $(foo \bar) != 'hello bar' ]] 47 then err_exit 'foo \bar, where foo is alias for "print hello " failed' 49 alias bar='foo world' 50 if [[ $(bar) != 'hello world' ]] 51 then err_exit 'bar, where bar i [all...] |
H A D | select.sh | 38 2) bar 42 select i in foo bar bam 53 select i in foo bar bam
|
H A D | nameref.sh | 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 245 function bar function [all...] |
H A D | namespace.sh | 35 typeset -C bar=(x=3 y=4 t=7) 68 foo=bar 69 typeset -C bar=(x=1 y=2 z=3) 75 [[ $(fn) == 'local fn bar' ]] || err_exit 'fn inside namespace should run local function' 81 [[ ${bar.y} == 2 ]] || err_exit 'local variable bar.y not found' 82 [[ ${bar.t} == '' ]] || err_exit 'global bar.t should not be visible' 93 [[ $(runxrun) == 'xfun local bar' ]] || err_exit 'local function on FPATH failed' 94 [[ $(runrun $foo) == 'local prog bar' ]] || err_exi [all...] |
H A D | return.sh | 38 foo=NOVAL bar=NOVAL 49 else bar "$@" 53 function bar function 55 typeset bar=NOEXIT 56 trap 'bar=EXIT' EXIT 71 foo=NOVAL bar=NOVAL 98 [[ $bar == EXIT ]] || err_exit "foo 2 0: bar exit trap not set" 105 [[ $bar == EXIT ]] || err_exit "foo 2 3: bar exi [all...] |
H A D | case.sh | 31 bar=foo2 37 $bar) foo=2;; 40 ${bar%?}5) 42 "${bar%?}6") 73 b) ( tmp=bar )
|
H A D | grep.sh | 91 this is a food bar test 92 to see how many lines find both foo and bar. 94 and some lines contain bar 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 D | arrays.sh | 102 foo[3]=bar 109 foo[3]=bar 132 x[2]=foo x[4]=bar 183 typeset foo=bar 185 if [[ ${foo[0]} != bar ]] 233 : $(set -A list foo bar) 238 list= (foo bar bam) 240 if [[ ${list[1]} != bar ]] 325 x=([foo]=bar) 338 [[ $($SHELL -c "var=(foo bar);expor [all...] |
H A D | functions.sh | 40 bar=bye 45 1) print -r - "$foo" "$bar";; 48 integer bar=10 49 print -r - "$foo" "$bar";; 71 if [[ $(bar=foo foobar 1) != '33 foo' ]] 74 if [[ $bar == foo ]] 124 print bar 132 if [[ $(foo) != bar ]] 191 print bar 193 if [[ $(foo) != bar ]] 201 function bar function 872 function bar function 911 function bar function 990 bar() { caller;} function 1033 function bar function 1062 function bar function [all...] |
H A D | comvar.sh | 64 x=( [foo]=bar ) 65 if [[ ${x[@]} != bar ]] 79 x.foo.bar=7 80 [[ ${x.foo.bar} == 7 ]] || err_exit '[[ ${x.foo.bar} != 7 ]]' 81 (( x.foo.bar == 7 ))|| err_exit '(( x.foo.bar != 7 ))' 82 [[ ${x.foo} == *bar=7* ]] || err_exit '[[ ${x.foo} != *bar=7* ]]' 88 $SHELL -c $'x=(foo=bar)\ [all...] |
H A D | quoting.sh | 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' 187 set -- $(/bin/echo foo;sleep 1;/bin/echo bar) 213 foo=bar 214 bar=$(print -r -- ${foo+\\n\ }) 215 if [[ $bar ! [all...] |
H A D | basic.sh | 126 bar=foo 127 eval foo=\$bar 129 then err_exit 'eval foo=\$bar not working' 131 bar='foo=foo\ bar' 132 eval $bar 133 if [[ $foo != 'foo bar' ]] 134 then err_exit 'eval foo=\$bar, with bar="foo\ bar" no [all...] |
H A D | variables.sh | 121 x=bar 131 if [[ $x != bar ]] 136 foo=bar 144 if [[ $foo != bar ]] 196 eval foo='$'$i bar='$'{$i} 197 if [[ ${foo} != "${bar}" ]] 200 command eval bar='$'{$i%?} 2> /dev/null || err_exit "\${$i%?} gives syntax error" 201 if [[ $i != [@*] && ${foo%?} != "$bar" ]] 204 command eval bar='$'{$i#?} 2> /dev/null || err_exit "\${$i#?} gives syntax error" 205 if [[ $i != [@*] && ${foo#?} != "$bar" ]] [all...] |
H A D | bracket.sh | 107 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" ;} 305 bar=(a b c) 306 [[ -v bar[1] ]] || err_exit 'bar[1] should be set' 307 [[ ${bar[1]+x} ]] || err_exit '${foo[1]+x} should be x' 308 unset bar[1] 309 [[ ${bar[ [all...] |
H A D | types.sh | 38 typeset x=(hi=ok bar=yes) 90 typeset -A arr=([foo]=one [bar]=2) 91 typeset -A brr=([foo]=one [bar]=2) 108 typeset -m brr[foo]=brr[bar] 110 [[ ${brr[bar]} ]] && err_exit 'brr[bar] should be unset after move' 125 typeset x=foo y=bar 243 function bar function 249 bar 394 oset foo bar [all...] |
H A D | attributes.sh | 91 foo=bar 95 if [[ $x != bar ]] 154 foo=bar 155 if [[ $(export | grep ^foo=) != 'foo=bar' ]] 160 bar 162 if [[ $(export | grep ^foo=) != 'foo=bar' ]] 215 unset foo bar 220 typeset -x bar=world 225 [[ $(export | grep bar) ]] && err_exit 'typeset -x not local' 250 foo=bar [all...] |
H A D | subshell.sh | 39 z.bar[0]=hello 40 z.bar[2]=world 41 z.bar[1]=(x=4 y=5) 43 typeset -a bar=( 61 z.bar[1]=yesyes 62 [[ ${z.bar[1]} == yesyes ]] || err_exit 'reassign of index array compound variable fails' 63 z.bar[1]=(x=12 y=5) 64 [[ ${z.bar[1]} == $'(\n\tx=12\n\ty=5\n)' ]] || err_exit 'reassign array simple to compound variable fails' 75 z.bar[1]=yes 76 [[ ${z.bar[ 301 function bar function [all...] |
H A D | sigchld.sh | 142 do if print foo | grep bar
|
H A D | builtins.sh | 36 : ${foo=bar} || err_exit ": failed" 37 [[ $foo == bar ]] || err_exit ": side effects failed" 73 false ${foo=bar} && err_exit "false failed" 143 if [[ $( for i in foo bar 174 if [[ $(abc: for i in foo bar;do print $i;break abc;done) != foo ]] 354 if [[ $(foo=bar; eval foo=\$foo $env exec -c \$SHELL -c \'print \$foo\') != bar ]] 410 set -- -a -b $optarg -c bar 636 read baz <<< 'foo\\\\bar' 637 [[ $baz == 'foo\\bar' ]] || err_exi [all...] |
H A D | quoting2.sh | 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'
|
H A D | io.sh | 55 print bar >> file1 85 exp='foo|bar' 88 bar) semantics='dup' ;; 154 bar 488 print bar >; $tmp/file1 489 [[ $(<$tmp/file3) == bar ]] || err_exit '>; not following symlinks'
|
H A D | substring.sh | 30 base=/home/dgk/foo//bar 86 if [[ ${string1#*/bar} != /abcabcabc ]] 87 then err_exit "string1#*bar" 89 if [[ ${string1##*/bar} != /abcabcabc ]] 90 then err_exit "string1#*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|*/fo [all...] |
H A D | append.sh | 54 aarray+=( [2]=2 [3]=3 [foo]=bar )
|
H A D | coprocess.sh | 246 print -p bar 250 [[ $REPLY == bar ]] || err_exit "second REPLY from $cat coprocess is $REPLY not bar"
|
/ast/src/cmd/pax/ |
H A D | misc.c | 846 char bar[METER_parts + 1]; local 888 if ((i = (p / (100 / METER_parts))) >= sizeof(bar)) 889 i = sizeof(bar) - 1; 892 bar[n++] = '*'; 893 while (n < elementsof(bar) - 1) 894 bar[n++] = ' '; 895 bar[n] = 0; 896 state.meter.last = sfprintf(sfstderr, "%02d%% |%s| %s%s%*s\r", p, bar, e, s, k, "") - k - 1;
|