Lines Matching defs:err_exit

20 function err_exit
26 alias err_exit='err_exit $LINENO'
32 then err_exit "single quotes not the same as double quotes"
36 then err_exit "$x not the same as 'hi there'"
39 then err_exit "$x not the same as \"hi there \""
42 then err_exit " \\ differs from '' "
45 then err_exit " \"\" differs from '' "
48 then err_exit "\$(print -r - '') differs from ''"
51 then err_exit "\$(print -r - '') differs from ''"
54 then err_exit "\"\$(print -r - '')\" differs from ''"
57 then err_exit "\"\$(print -r - "")\" differs from ''"
60 then err_exit "nested \$(print -r - '') differs from ''"
63 then err_exit "\"nested \$(print -r - '')\" differs from ''"
66 then err_exit "nested \"\$(print -r - '')\" differs from ''"
70 then err_exit "\${x-\$(print -r - '')} differs from ''"
73 then err_exit "\${x-\$(print -r - '}')} differs from ''"
77 then err_exit "((cmd)|(cmd)) failed"
81 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 != \*'
158 then err_exit '(print -r -- "\}"' not working
161 then err_exit 'print -r -- "\{"' not working
166 then err_exit '`eval print \\${foo$x}`' not working
169 then err_exit '"`eval print \\${foo$x}`"' not working
172 then err_exit '$() not working'
177 then err_exit 'IFS not working correctly with command substitution'
179 $SHELL -n 2> /dev/null << \! || err_exit '$(...) bug with ( in comment'
188 do eval [[ '$('print -r -- \'$i\'\$x')' != "'$i'" ]] && err_exit "quoting of $i\$x with $j enabled failed"
189 eval [[ '$('print -r -- \'$i\'\${x%*}')' != "'$i'" ]] && err_exit "quoting of $i\${x%*} with $j enabled failed"
191 then eval [[ '$('print -r -- \'$i\'\${x:-*}')' != "'$i''*'" ]] && err_exit "quoting of $i\${x:-*} with $j enabled failed"
197 [[ "$" == '$' ]] || err_exit '"$" != $'
198 [[ "${foo}$" == 'foo$' ]] || err_exit 'foo=foo;"${foo}$" != foo$'
199 [[ "${foo}${foo}$" == 'foofoo$' ]] || err_exit 'foo=foo;"${foo}${foo}$" != foofoo$'
201 [[ "$foo" == ~(Elr)(\\\$|#)\ ]] || err_exit $'\'$ \' not matching RE \\\\\\$|#\''
202 [[ "$foo" == ~(Elr)('\$'|#)\ ]] || err_exit $'\'$ \' not matching RE \'\\$\'|#\''
204 [[ "$foo" == ~(Elr)(\\\$|#)\ ]] || err_exit $'\'# \' not matching RE \\'\$|#\''
205 [[ "$foo" == ~(Elr)('\$'|#)\ ]] || err_exit $'\'# \' not matching RE \'\\$\'|#\''
206 [[ '\$' == '\$'* ]] || err_exit $'\'\\$\' not matching \'\\$\'*'
207 [[ a+a == ~(E)a\+a ]] || err_exit '~(E)a\+a not matching a+a'
208 [[ a+a =~ a\+a ]] || err_exit 'RE a\+a not matching a+a'