Lines Matching refs:err_exit

20 function err_exit
26 alias err_exit='err_exit $LINENO'
31 then err_exit "single quotes not the same as double quotes"
35 then err_exit "$x not the same as 'hi there'"
38 then err_exit "$x not the same as \"hi there \""
41 then err_exit " \\ differs from '' "
44 then err_exit " \"\" differs from '' "
47 then err_exit "\$(print -r - '') differs from ''"
50 then err_exit "\$(print -r - '') differs from ''"
53 then err_exit "\"\$(print -r - '')\" differs from ''"
56 then err_exit "\"\$(print -r - "")\" differs from ''"
59 then err_exit "nested \$(print -r - '') differs from ''"
62 then err_exit "\"nested \$(print -r - '')\" differs from ''"
65 then err_exit "nested \"\$(print -r - '')\" differs from ''"
69 then err_exit "\${x-\$(print -r - '')} differs from ''"
72 then err_exit "\${x-\$(print -r - '}')} differs from ''"
76 then err_exit "((cmd)|(cmd)) failed"
80 then err_exit "nested double quotes failed"
85 then err_exit '${z="a{b}c"} not correct'
90 then err_exit '"${z="a{b}c"}" not correct'
93 then err_exit '$(print -r -- "a\*b") differs from a\*b'
97 then err_exit '$(print -r -- "a\*b$x") differs from a\*b'
102 then err_exit '${x+foo bar bam} does not yield three arguments'
106 then err_exit '${x+foo "bar bam"} does not yield two arguments'
110 then err_exit '${x+foo '\''bar bam'\''} does not yield two arguments'
114 then err_exit '${x+foo $x bam} does not yield three arguments'
118 then err_exit '${x+foo "$x" bam} does not yield three arguments'
122 then err_exit '${x+"foo $x bam"} does not yield one argument'
126 then err_exit '"${x+foo $x bam}" does not yield one argument'
130 then err_exit '${x+foo "$x "bam} does not yield two arguments'
134 then err_exit '$'"' inside double quotes not working"
138 then err_exit '$'"' inside `` quotes not working"
145 then err_exit 'line continuation in double strings not working'
151 then err_exit 'line continuation in expanded double strings not working'
155 then err_exit 'x="\\*";$x != \*'
160 then err_exit 'field splitting error'
178 then err_exit "length of x, ${#x}, is incorrect should be $((15*73-3))"
182 then err_exit ' $x\$, with x=$hi, does not expand to $hi$'
185 then err_exit ' $x$, with x=$hi, does not expand to $hi$'
189 then err_exit 'word splitting after command substitution not working'
193 then err_exit 'expansion of "{q:+'\''}" not correct when q unset'
197 then err_exit 'expansion of "{q:+'\''}" not correct when q set'
201 then err_exit "$'x\' #y'" not working
205 then err_exit "$q$'x\' #y'" not working
211 then err_exit "field splitting of $x with IFS=$IFS not working"
216 then err_exit '${foo+\\n\ } expansion error'
221 then err_exit '${foo+\\n\ $bar} expansion error with bar unset'
225 then err_exit '$x, where x=\\(..\\)|&\|\|\\&\\| not working'
229 then err_exit 'a${x}b, where x=\\( not working'
233 then err_exit 'backreference inside single quotes broken'
238 then err_exit '"$@" not preserving nulls'
242 then err_exit 'print -r s"!\2${x}\1\a!" not equal s!\2\1\a!'
245 then err_exit 'trailing newlines on comsubstitution not removed'
249 then err_exit '${x:='//'} != "//"'
252 then err_exit '$\ not correct inside ""'
256 then err_exit '"${x-a\}b}" != "a}b"'
259 then err_exit '"\}\]$x\*\{\[\\" != "\}\]\*\{\[\"'
263 then err_exit '{\$foo}' not expanded correctly
304 print foo) ]] || err_exit "command subsitution with long comments broken"
307 [[ ${subject/${re}/\3} != words ]] && err_exit 'string replacement with \3 not working'
308 [[ ${subject/${re}/'\3'} != '\3' ]] && err_exit 'string replacement with '"'\3'"' not working'
309 [[ ${subject/${re}/"\\3"} != '\3' ]] && err_exit 'string replacement with "\\3" not working'
310 [[ ${subject/${re}/"\3"} != '\3' ]] && err_exit 'string replacement with "\3" not working'
312 [[ ${subject/${re}/${string}} != words ]] && err_exit 'string replacement with $string not working with string=\3'
313 [[ $(print -r "${subject/${re}/${string}}") != words ]] && err_exit 'string replacement with $string not working with string=\3 using print'
314 [[ ${subject/${re}/"${string}"} != '\3' ]] && err_exit 'string replacement with "$string" not working with string=\3'
315 [[ $(print -r "${subject/${re}/"${string}"}") != '\3' ]] && err_exit 'string replacement with "$string" not working with string=\3 using print'
317 [[ ${subject/${re}/${string}} != '\3' ]] && err_exit 'string replacement with $string not working with string=\\3'
318 [[ ${subject/${re}/"${string}"} != '\\3' ]] && err_exit 'string replacement with "$string" not working with string=\\3'
319 [[ ${subject/${re}/\4} != '\4' ]] && err_exit 'string replacement with \4 not working'
320 [[ ${subject/${re}/'\4'} != '\4' ]] && err_exit 'string replacement with '\4' not working'
322 [[ ${subject/${re}/${string}} != '\4' ]] && err_exit 'string replacement with $string not working with string=\4'
323 [[ ${subject/${re}/"${string}"} != '\4' ]] && err_exit 'string replacement with "$string" not working with string=\4'
325 [[ ${subject/${re}/${string}} != '&foo' ]] && err_exit 'string replacement with $string not working with string=&foo'
326 [[ ${subject/${re}/"${string}"} != '&foo' ]] && err_exit 'string replacement with "$string" not working with string=&foo'
330 } 2> /dev/null || err_exit 'skipping over `` failed'
331 [[ $x == x ]] || err_exit 'assignment ${x:=`...`} failed'
332 [[ $($SHELL -c 'print a[') == 'a[' ]] || err_exit "unbalanced '[' in command arg fails"
333 $SHELL -c $'false && (( `wc -l /dev/null | nawk \'{print $1}\'` > 2 )) && true;:' 2> /dev/null || err_exit 'syntax error with ` in arithmetic expression'
334 { $SHELL -c '(( 1`: "{ }"` ))' ;} 2> /dev/null || err_exit 'problem with ` inside (())'
337 [[ $x == '"$foobarx"' ]] || err_exit $'\\$\' not handled correctly inside ``'
341 [[ $foo == "$copy1" ]] || err_exit '$"..." not being ignored inside ``'
343 [[ $($SHELL -c 'set -- ${1+"$@"}; print $#' cmd '') == 1 ]] || err_exit '${1+"$@"} with one empty argument fails'
344 [[ $($SHELL -c 'set -- ${1+"$@"}; print $#' cmd foo '') == 2 ]] || err_exit '${1+"$@"} with one non-empty and on empty argument fails'
345 [[ $($SHELL -c 'set -- ${1+"$@"}; print $#' cmd "" '') == 2 ]] || err_exit '${1+"$@"} with two empty arguments fails'
346 [[ $($SHELL -c 'set -- ${1+"$@"}; print $#' cmd "" '' '') == 3 ]] || err_exit '${1+"$@"} with three empty arguments fails'
347 [[ $($SHELL -c 'set -- "$@"; print $#' cmd '') == 1 ]] || err_exit '"$@" with one empty argument fails'
348 [[ $($SHELL -c 'set -- "${@:2}"; print $#' cmd '') == 0 ]] || err_exit '"$@" with one empty argument fails'
349 [[ $($SHELL -c 'set -- "$@"; print $#' cmd foo '') == 2 ]] || err_exit '"$@" with one non-empty and on empty argument fails'
350 [[ $($SHELL -c 'set -- "$@"; print $#' cmd "" '') == 2 ]] || err_exit '"$@" with two empty arguments fails'
351 [[ $($SHELL -c 'set -- "$@"; print $#' cmd "" '' '') == 3 ]] || err_exit '"$@" with three empty arguments fails'
354 [[ $# == 1 ]] || err_exit '"${args[@]}"} with one empty argument fails'
356 [[ $# == 1 ]] || err_exit '${1+"${args[@]}"} with one empty argument fails'
359 [[ $# == 2 ]] || err_exit '"${args[@]}"} with one non-empty and one empty argument fails'
361 [[ $# == 2 ]] || err_exit '${1+"${args[@]}"} with one non-empty and one empty argument fails'
367 (( $# )) && err_exit 'set -- "${ARGS[@]}" for empty array should not produce arguments'