Lines Matching defs:err_exit
20 function err_exit
26 alias err_exit='err_exit $LINENO'
33 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; }
39 [[ "$b" == "$a" ]] || err_exit "locale not restored after subshell -- expected '$a', got '$b'"
41 [[ "$b" == "$a" ]] || err_exit "locale not restored after subshell -- expected '$a', got '$b'"
54 [[ $b == "$n" ]] || err_exit "LC_ALL=$locale printf difference for \"$s\" -- expected '$n', got '$b'"
57 [[ $u == "$q" ]] || err_exit "LC_ALL=$locale quoted print difference for \"$s\" -- $b => '$u' vs \"$b\" => '$q'"
96 [[ "$u" == "$x" ]] || err_exit LC_ALL=$locale multibyte value/trace format failed
100 [[ $u == $x ]] || err_exit LC_ALL=$locale multibyte %04x printf format failed
104 then LC_ALL=$locale $SHELL -c b1=$'"\342\202\254\342\202\254\342\202\254\342\202\254w\342\202\254\342\202\254\342\202\254\342\202\254"; [[ ${b1:4:1} == w ]]' || err_exit 'multibyte ${var:offset:len} not working correctly'
121 [[ $got == $exp ]] || err_exit "command wc LC_ALL default failed -- expected '$exp', got '$got'"
135 [[ $got == $exp ]] || err_exit "builtin wc LC_ALL default failed -- expected '$exp', got '$got'"
151 LC_ALL=$locale $SHELL < ko.dat 2> /dev/null || err_exit "script with multibyte char straddling buffer boundary fails"
182 [[ $got == $exp ]] || err_exit "${T} sequence failed -- expected '$exp', got '$got'"
200 err_exit "join test script failed -- exit code $?"
203 [[ $got == "$exp" ]] || err_exit "LC_ALL test script failed -- expected '$exp', got '$got'"
209 [[ $got == "$exp" ]] || err_exit "multibyte variable definition/expansion failed -- expected '$exp', got '$got'"
211 [[ $got == "$exp" ]] || err_exit "multibyte ksh function definition/execution failed -- expected '$exp', got '$got'"
213 [[ $got == "$exp" ]] || err_exit "multibyte posix function definition/execution failed -- expected '$exp', got '$got'"
226 then err_exit '${#x} not working with multibyte locales'
236 (( ${got:-0} == $exp )) || err_exit "'$cmd' sequence failed -- error message not localized"
243 err_exit "'$tst' failed -- exit status $?"
255 [[ $got == $exp ]] || err_exit "'$tst' failed -- expected '$exp', got '$got'"
261 [[ $got == $exp ]] || err_exit "multibyte debug locale \$a<2A@>z failed -- expected '$exp', got '$got'"
276 err_exit "LANG change not seen by function -- expected $EXP or $ALT, got $GOT"
282 [[ $got == "$exp" ]] || err_exit "$\"...\" containing expansions fails: expected $exp, got $got"
286 [[ $got == "$exp" ]] || err_exit "$\"...\" in assignment expansion fails: expected $exp got $got"
292 [[ $x == hello ]] || err_exit 'assignment of message strings not working'
308 [[ ${#x} == 8641 ]] || err_exit 'here doc contains wrong number of chars with multibyte locale'
309 [[ $x == *$'next character is multibyte<2b|>c<3d|\>foo'* ]] || err_exit "here_doc doesn't contain line with multibyte chars"
313 (( x == 3 )) || err_exit 'character length of multibyte character should be 3'
315 [[ $x == ' a<2b|>c' ]] || err_exit 'typeset -R10 should begin with three spaces'
317 [[ $x == 'a<2b|>c ' ]] || err_exit 'typeset -L10 should end in three spaces'
332 err_exit "unicode char$p1 ${x#?} $p2 in locale $LC_ALL"
336 [[ $(print -r -- "$x") == $'hello\u[20ac]\xee world' ]] || err_exit '%q with unicode and non-unicode not working'
339 [[ $(print -r -- "$x" | od -An -tx1) == "$got" ]] || err_exit "incorrect string from printf %q"