Home
last modified time | relevance | path

Searched refs:err_exit (Results 1 – 25 of 117) sorted by relevance

12345

/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/tests/
H A Dbracket.sh20 function err_exit function
26 alias err_exit='err_exit $LINENO' alias
51 then err_exit "-a: $file should exist"
54 then err_exit "-e: $file should exist"
102 else err_exit " wrong precedence"
108 then err_exit "foo comes before bar"
163 then err_exit '3 < 4'
166 then err_exit '3 > 4'
169 then err_exit '3x < 4x'
180 then err_exit "setuid on $SHELL"
[all …]
H A Dsubstring.sh20 function err_exit function
33 then err_exit "string1:0"
36 then err_exit "string1: -1"
39 then err_exit "string1:0"
42 then err_exit "string1:1"
45 then err_exit "string1:1:4"
51 then err_exit "string1:1:j"
75 then err_exit "string1%/*"
78 then err_exit '"string1%/*"'
81 then err_exit 'string1%"/*"'
[all …]
H A Dbuiltins.sh20 function err_exit function
26 alias err_exit='err_exit $LINENO' alias
36 : ${foo=bar} || err_exit ": failed"
133 then err_exit '$0 not correct for eval'
178 then err_exit 'command -v not working'
220 then err_exit 'printf -- not working'
247 then err_exit 'printf \0 not working'
290 then err_exit 'printf %H not working'
299 then err_exit 'printf %T not working'
320 err_exit 'printf "%T" now'
[all …]
H A Darrays.sh20 function err_exit function
26 alias err_exit='err_exit $LINENO' alias
45 then err_exit '$x is not element 0'
57 then err_exit ' element two is not 2'
64 then err_exit '$x is not element 0'
73 then err_exit ' element two is not 2'
80 then err_exit '${y[0] is not nine'
153 then err_exit '(( s[$z] != 3 ))'
160 then err_exit '(( s[$y] != 4 ))'
197 then err_exit '${#} not 13'
[all …]
H A Dattributes.sh20 function err_exit function
48 then err_exit uppercase fails
51 then err_exit lowercase fails
57 then err_exit tagged fails
60 then err_exit tagged fails
63 then err_exit zerofill fails
70 then err_exit leftjust fails
73 then err_exit leftjust fails
85 then err_exit export fails
145 then err_exit 'LAST!=2'
[all …]
H A Doptions.sh20 function err_exit function
26 alias err_exit='err_exit $LINENO' alias
51 then err_exit 'sh -e not working'
94 err_exit '-E ignores $ENV file'
96 err_exit '+E reads $ENV file'
98 err_exit '--rc ignores $ENV file'
100 err_exit '--norc reads $ENV file'
102 err_exit '-i ignores $ENV file'
122 err_exit '-E ignores empty $ENV'
206 err_exit '-l ignores .profile'
[all …]
H A Dbasic.sh20 function err_exit function
26 alias err_exit='err_exit $LINENO' alias
58 then err_exit 'umask -S incorrect'
103 then err_exit "dat* matches only $# files"
117 cd ~- || err_exit "cd back failed"
139 then err_exit 'cd ../../tmp is not /tmp'
148 then err_exit "$foobar is not foobar"
165 then err_exit "script not working"
168 then err_exit "script | cat not working"
211 then err_exit "nested scripts failed"
[all …]
H A Dvariables.sh20 function err_exit function
26 alias err_exit='err_exit $LINENO' alias
41 then err_exit RANDOM variable not working
46 then err_exit SECONDS variable not working
51 then err_exit _ variable not working
77 cd $old || err_exit cd failed
83 then err_exit REPLY variable not working
92 then err_exit LINENO variable not working
172 then err_exit "C locale not working"
202 then err_exit "\${$i%?} not correct"
[all …]
H A Dio.sh20 function err_exit function
26 alias err_exit='err_exit $LINENO' alias
53 cd $tmp || { err_exit "cd $tmp failed"; exit ; }
57 then err_exit 'append (>>) not working'
67 then err_exit 'noclobber not causing exclusive open'
148 cd ~- || err_exit "cd back failed"
208 then err_exit "{n}<&0 not working with for loop"
256 else err_exit "$tmp/seek: cannot open for reading"
266 else err_exit 'not able to parse {n}</dev/null'
323 then err_exit 'read -n1 not working'
[all …]
H A Dfunctions.sh20 function err_exit function
26 alias err_exit='err_exit $LINENO' alias
68 then err_exit '$0 not correct'
75 then err_exit 'scoping error'
79 then err_exit non-local variables
84 then err_exit EXIT trap in wrong scope
103 then err_exit 'abc() print hi not working'
115 err_exit 'exit from function not working'
226 then err_exit 'autoload not working'
417 then err_exit 'ERR trap not cleared'
[all …]
H A Dcomvar.sh20 function err_exit function
26 alias err_exit='err_exit $LINENO' alias
36 then err_exit 'compound variable not working'
40 then err_exit 'reference to compound object not working'
53 then err_exit 'copying a compound object not working'
304 [[ $? == 0 ]] || err_exit ' read -C failed'
305 [[ $bar == "$foo" ]] || err_exit '$foo != $bar'
306 [[ $bam == "$foo2" ]] || err_exit '$foo2 != $bmr'
314 [[ $x == "$y" ]] || err_exit '$x != $y with %B'
316 [[ $x == "$y" ]] || err_exit '$x != $y with %#B'
[all …]
H A Dcubetype.sh20 function err_exit function
26 alias err_exit='err_exit $LINENO' alias
127 [[ ${c.x} == 8 ]] || err_exit '${c.x} != 8'
128 [[ ${c.depth} == 1 ]] || err_exit '${c.depth} != 1'
133 (( c.count == 2 )) || err_exit 'c.count != 2'
137 [[ $d == "$c" ]] || err_exit '$d != $c'
139 [[ $zzz == "$c" ]] || err_exit '$zzz != $c'
144 [[ $ccc == "$c" ]] || err_exit '$ccc != $c'
151 [[ ${cc[0].x} == 8 ]] || err_exit 'cc[0].x !=8'
152 [[ ${cc[2].y} == 3 ]] || err_exit '${cc[2].y} != 3'
[all …]
H A Dcomvario.sh41 function err_exit function
47 alias err_exit='err_exit $LINENO' alias
177 } || err_exit "test returned exit code $?"
185 unset x y || err_exit "unset failed"
186 [[ "$x" == '' ]] || err_exit "cleanup failed for x"
187 [[ "$y" == '' ]] || err_exit "cleanup failed for y"
245 } || err_exit "test returned exit code $?"
250 [[ "$y1" != "" ]] || err_exit "y1 is empty"
251 [[ "$y2" != "" ]] || err_exit "y2 is empty"
270 unset x y1 y2 || err_exit "unset failed"
[all …]
H A Dpointtype.sh20 function err_exit function
26 alias err_exit='err_exit $LINENO' alias
43 [[ ${p.x} == 1 ]] || err_exit '${p[x]} is not 1'
45 [[ $(p.len) == 1 ]] || err_exit '$(p.len) != 1'
46 [[ ${p.len} == 1 ]] || err_exit '${p.len} != 1'
47 (( p.len == 1 )) || err_exit '((p.len != 1))'
49 (( q.x == 1 )) || err_exit 'q.x is not 1'
55 (( q.len == 3 )) || err_exit 'q.len is not 3'
60 (( p.len == 3 )) || err_exit 'p.len is not 3'
92 [[ ${p.y} == 6 ]] || err_exit '${p.y} != 6'
[all …]
H A Dtypes.sh20 function err_exit function
26 alias err_exit='err_exit $LINENO' alias
47 [[ $r == "$s" ]] || err_exit 'r is not equal to s'
53 [[ $y == "$z" ]] || err_exit 'y is not equal to z'
97 [[ $x == "$y" ]] || err_exit 'x is not equal to y'
100 [[ $r == "$z" ]] || err_exit 'r is not equal to z'
191 [[ ${var.r} == "$r" ]] || err_exit 'var.r != r'
192 (( var.z == 5)) || err_exit 'var.z !=5'
478 else err_exit 'unable to load types dynamically'
504 err_exit 'typeset -T not supported'
[all …]
H A Dreturn.sh22 function err_exit function
28 alias err_exit='err_exit $LINENO' alias
69 err_exit "foo $@: doesn't remove $file"
74 (exit 0) || err_exit "exit 0 is not zero"
75 (return 0) || err_exit "return 0 is not zero"
81 then err_exit "exit 35 is $ret not 35"
86 then err_exit "return 35 is $ret not 35"
89 foo 0 0 || err_exit "foo 0 0: incorrect return"
94 then err_exit "foo 0 3: return is $ret not 3"
103 then err_exit "foo 2 3: return is $ret not 3"
[all …]
H A Dpath.sh20 function err_exit function
26 alias err_exit='err_exit $LINENO' alias
61 [[ ${ dir2;} == dir2 ]] || err_exit 'should be dir2'
66 [[ ${ dir1;} == dir1 ]] || err_exit 'should be dir1'
104 then err_exit 'not an error to run ksh on a directory'
144 then err_exit "leading : in path not working"
213 then err_exit 'trailing : in pathname not working'
218 then err_exit 'leading : in pathname not working'
222 then err_exit 'pathname not restored after scoping'
234 then err_exit 'setting PATH to Null not working'
[all …]
H A Darrays2.sh20 function err_exit function
26 alias err_exit='err_exit $LINENO' alias
42 do [[ $k == "$i$j" ]] || err_exit "\${a[i][@]} != $i$j"
74 [[ $a == 00 ]] || err_exit "\$$c is not 00"
75 [[ ${a[0]} == 00 ]] || err_exit "\${$a[0]} is not 00"
79 [[ ${b[3]} == 23 ]] || err_exit "${!b}[3] not = 23"
119 [[ ${a-set} ]] || err_exit "a is set after unset"
120 [[ ${b-set} ]] || err_exit "b is set after unset"
121 [[ ${c-set} ]] || err_exit "c is set after unset"
122 [[ ${d-set} ]] || err_exit "c is set after unset"
[all …]
H A Dalias.sh20 function err_exit function
26 alias err_exit='err_exit $LINENO' alias
31 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; }
51 then err_exit 'bar, where bar is alias for "foo world" failed'
56 unalias foo || err_exit "unalias foo failed"
67 then err_exit 'alias bar cause variable bar to be set'
71 then err_exit 'alias for !!=print not working'
75 then err_exit 'alias in command substitution not working'
79 then err_exit 'alias not working after unalias in subshell'
92 hash -r -- $i 2>/dev/null || err_exit "hash -r -- $i failed"
[all …]
/illumos-gate/usr/src/cmd/ast/libshell/common/tests/
H A Dsun_solaris_builtin_sum.sh32 function err_exit function
38 alias err_exit='err_exit $LINENO' alias
47 builtin sum || err_exit "sum builtin not found"
50 x="$(print 'hello' | /usr/bin/sum)" || err_exit "/usr/bin/sum pipe failed."
52 x="$(print 'hello' | sum)" || err_exit "sum builtin pipe failed."
53 [[ "$x" == "542 1" ]] || err_exit "print 'hello' | sum builtin did not return 542 1, got $x"
54 x="$(print 'hello' | sum -x md5)" || err_exit "sum md5 builtin pipe failed."
56 x="$(print 'hello' | sum -x sha1)" || err_exit "sum sha1 builtin pipe failed."
58 x="$(print 'hello' | sum -x sha256)" || err_exit "sum sha256 builtin pipe failed."
60 x="$(print 'hello' | sum -x sha512)" || err_exit "sum sha512 builtin pipe failed."
[all …]
H A Dsun_solaris_compound_misc.sh33 function err_exit function
39 alias err_exit='err_exit $LINENO' alias
93 [[ "$cx" == "$cy" ]] || err_exit "'$cx' != '$cy'"
94 [[ "$cx" == "$cz" ]] || err_exit "'$cx' != '$cz'"
95 [[ "$cy" == "$cz" ]] || err_exit "'$cy' != '$cz'"
97 count_brackets "$cx" || err_exit "Brackets not balanced for '$cx'"
98 count_brackets "$cy" || err_exit "Brackets not balanced for '$cy'"
99 count_brackets "$cz" || err_exit "Brackets not balanced for '$cz'"
131 [[ "$cx" == "$cy" ]] || err_exit "'$cx' != '$cy'"
132 [[ "$cx" == "$cz" ]] || err_exit "'$cx' != '$cz'"
[all …]
H A Dsun_solaris_compoundvario.sh27 function err_exit function
33 alias err_exit='err_exit $LINENO' alias
158 } || err_exit "test returned exit code $?"
166 unset x y || err_exit "unset failed"
167 [[ "$x" == "" ]] || err_exit "cleanup failed for x"
168 [[ "$y" == "" ]] || err_exit "cleanup failed for y"
226 } || err_exit "test returned exit code $?"
231 [[ "$y1" != "" ]] || err_exit "y1 is empty"
232 [[ "$y2" != "" ]] || err_exit "y2 is empty"
249 unset x y1 y2 || err_exit "unset failed"
[all …]
H A Dsun_solaris_array_default_datatype.sh34 function err_exit function
40 alias err_exit='err_exit $LINENO' alias
171 err_exit "${cycle}: Should not happen."
180 …(( mycpv.myindexedfloatarray[34] == 1.1 )) || err_exit "${cycle}: mycpv.myindexedfloatarray[34] ==…
182 …(( mycpv.myindexedfloatarray[34] == 2.2 )) || err_exit "${cycle}: mycpv.myindexedfloatarray[34] ==…
184 …(( mycpv.myindexedfloatarray[34] == 0.0 )) || err_exit "${cycle}: mycpv.myindexedfloatarray[34] ==…
188 …(( mycpv.myindexedfloatarray[34] == 1.1 )) || err_exit "${cycle}: mycpv.myindexedfloatarray[34] ==…
190 …(( mycpv.myindexedfloatarray[34] == 2.2 )) || err_exit "${cycle}: mycpv.myindexedfloatarray[34] ==…
289 …count_brackets "${mycpv}" || err_exit "${cycle}: bracket open ${bracketstat.bopen} != bracket clos…
296 [[ ! -v mycpv ]] || err_exit "${cycle}: mycpy should not exist"
[all …]
H A Dsun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh54 function err_exit function
60 alias err_exit='err_exit $LINENO' alias
70 …et l ; ( l=( a=1 b="BE" ) ; print "$l" ) ; print $l')" || err_exit "Non-zero exit co…
71 …et l ; ( ulimit -c 0 ; l=( a=1 b="BE" ) ; print "$l" ) ; print $l')" || err_exit "Non-zero exit co…
72 [[ "${var1}" == "${var2}" ]] || err_exit "Non-fork()'ed subshell output differes from fork()'ed sub…
75 var1="$(${SHELL} -c '( l=( a=1 b="BE" ) ; print "$l" ) ; print $l')" || err_exit "Non…
76 var2="$(${SHELL} -c '( ulimit -c 0 ; l=( a=1 b="BE" ) ; print "$l" ) ; print $l')" || err_exit "Non…
82 [[ "${var1}" == "${var2}" ]] || err_exit "Non-fork()'ed subshell output differes from fork()'ed sub…
85 …'( compound l ; l.a=1 ; l.b="BE" ; print "$l" ) ; print $l')" || err_exit "Non-zero exit co…
87 [[ "${var1}" == "${var2}" ]] || err_exit "Non-fork()'ed subshell output differes from fork()'ed sub…
[all …]
H A Dillumos_4149_builtin_head.sh22 function err_exit function
28 alias err_exit='err_exit $LINENO' alias
56 err_exit "Shell head -1 standard file"
59 err_exit "Shell head -2 standard file"
65 err_exit "Shell head -5 standard file"
71 err_exit "Shell tail -1 standard file"
74 err_exit "Shell tail -2 standard file"
82 err_exit "Shell head -1 one-line file"
85 err_exit "Shell head -2 one-line file"
88 err_exit "Shell tail -1 one-line file"
[all …]

12345