Lines Matching defs:err_exit

20 function err_exit
26 alias err_exit='err_exit $LINENO'
58 [[ "$got" == "$exp" ]] || err_exit "\${b.x} incorrect for iteration $i -- expected $exp, got '$got'"
60 (( got == exp )) || err_exit "b.len incorrect for iteration $i -- expected $exp, got '$got = sqrt(${b.x}*${b.x}+${b.y}*${b.y})'"
62 [[ "$got" == "$exp" ]] || err_exit "\${b.len} incorrect for iteration $i -- expected $exp, got '$got = sqrt(${b.x}*${b.x}+${b.y}*${b.y})'"
64 [[ "$got" == "${exp}" ]] || err_exit "\${b.name} incorrect for iteration $i -- expected $exp, got '$got'"
66 (( got == exp )) || err_exit "b.count incorrect for iteration $i -- expected $exp, got '$got'"
68 [[ "$got" == "$exp" ]] || err_exit "\${b.ccount} incorrect for iteration $i -- expected $exp, got '$got'"
72 [[ "$got" == "$exp" ]] || err_exit "\${#b.colors[@]} incorrect for iteration $i -- expected $exp, got '$got'"
77 [[ ${#b.items[@]} == 3 ]] || err_exit "\${#b.items[@]} incorrect for iteration $i -- expected $exp, got '$got'"
81 [[ ${#bb.colors[@]} == 4 ]] || err_exit "\${#bb.colors[@]} incorrect for iteration $i -- expected $exp, got '$got'"
84 [[ ${#b.colors[@]} == 2 ]] || err_exit "\${#b.colors[@]} incorrect for iteration $i -- expected $exp, got '$got'"
87 [[ ${#b.items[@]} == 2 ]] || err_exit "\${#b.items[@]} incorrect for iteration $i -- expected $exp, got '$got'"
90 [[ ${#bb.colors[@]} == 2 ]] || err_exit "\${#bb.colors[@]} incorrect for iteration $i -- expected $exp, got '$got'"
93 [[ ${#bb.items[@]} == 2 ]] || err_exit "\${#bb.items[@]} incorrect for iteration $i -- expected $exp, got '$got'"
94 [[ $b == "$bb" ]] || err_exit "\$b='$b' != \$bb='$bb'"
123 [[ ${b.name} == box2 ]] || err_exit "\${b.name} incorrect -- expected box2, got '${b.name}'"
124 (( b.len == 5 )) || err_exit "b.len incorrect for box2 -- expected 5, got '$(( b.len ))'"
125 (( b.count == 1 )) || err_exit "b.count incorrect -- expected 1, got '$(( b.count ))'"
127 [[ $c == $'(\n\ttypeset -l -E x=8\n\ttypeset -l -E y=5\n\tcomvar=(\n\t\ttop=8\n\t\tbottom=9\n\t)\n\ttypeset -S -l -i count=1\n\ttypeset -a items=(\n\t\tfoo\n\t\tbar\n\t)\n\ttypeset -A colors=(\n\t\t[floor]=red\n\t\t[wall]=blue\n\t)\n\tname=cube1\n\ttypeset -L 6 status=INIT\n\ttypeset -l -E z=1\n)' ]] || err_exit '$c not correct'
128 [[ ${c.x} == 8 ]] || err_exit '${c.x} != 8'
129 [[ ${c.depth} == 1 ]] || err_exit '${c.depth} != 1'
130 [[ ${c.name} == cube1 ]] || err_exit '${c.name} != cube1 '
131 [[ $(c.fun) == 'hello world' ]] || err_exit '$(c.fun) != "hello world"'
132 [[ ${c.fun} == 'hello world' ]] || err_exit '${c.fun} != "hello world"'
133 (( abs(c.len - sqrt(90)) < 1e-10 )) || err_exit 'c.len != sqrt(90)'
134 (( c.count == 2 )) || err_exit 'c.count != 2'
135 (( c.count == b.count )) || err_exit 'c.count != b.count'
138 [[ $d == "$c" ]] || err_exit '$d != $c'
140 [[ $zzz == "$c" ]] || err_exit '$zzz != $c'
142 [[ $zzz == "$c" ]] || err_exit '$zzz != $c without eval'
145 [[ $ccc == "$c" ]] || err_exit '$ccc != $c'
152 [[ ${cc[0].x} == 8 ]] || err_exit 'cc[0].x !=8'
153 [[ ${cc[2].y} == 3 ]] || err_exit '${cc[2].y} != 3'
154 (( cc[2].y == 3 )) || err_exit '(( cc[2].y != 3))'
155 [[ ${cc[2].colors[table]} == white ]] || err_exit '${cc[2].colors[table]} != white'
156 [[ ${cc[2].items[2]} == pencil ]] || err_exit '${cc[2].items[2]} != pencil'
157 (( cc[2].len == 7 )) || err_exit '(( cc[2].len != 7 ))'
158 [[ $(cc[2].len) == 7 ]] || err_exit '$(cc[2].len) != 7 ))'
159 [[ ${cc[2].len} == 7 ]] || err_exit '${cc[2].len} != 7 ))'
160 (( cc[2].count == 2 )) || err_exit 'cc[2].count != 2'
162 (( cc[2].len == cc[0].len )) || err_exit 'cc[2].len != cc[0].len'
163 (( cc[2].len == cc.len )) || err_exit 'cc[2].len != cc.len'
164 (( cc[2].count == 6 )) || err_exit 'cc[2].count != 6'
166 [[ $cc == "${cc[2]}" ]] || err_exit '$cc != ${cc[2]}'
172 [[ ${#cc[@]} == 2 ]] || err_exit '${#cc[@]} != 2'
173 [[ ${cc[two].y} == 3 ]] || err_exit '${cc[two].y} != 3'
174 (( cc[two].y == 3 )) || err_exit '(( cc[two].y != 3))'
175 [[ ${cc[two].colors[table]} == white ]] || err_exit '${cc[two].colors[table]} != white'
176 [[ ${cc[two].items[2]} == pencil ]] || err_exit '${cc[two].items[2]} != pencil'
177 (( cc[two].len == 7 )) || err_exit '(( cc[two].len != 7 ))'
178 [[ $(cc[two].len) == 7 ]] || err_exit '$(cc[two].len) != 7 ))'
179 [[ ${cc[two].len} == 7 ]] || err_exit '${cc[two].len} != 7 ))'
180 (( cc[two].count == 2 )) || err_exit 'cc[two].count != 2'
182 (( cc[two].len == cc[one].len )) || err_exit 'cc[two].len != cc[one].len'
183 (( cc[two].count == 4 )) || err_exit 'cc[two].count != 4'
185 [[ ${cc[one]} == "${cc[two]}" ]] || err_exit '${cc[one]} != ${cc[two]}'
192 [[ ${#cc[@]} == 2 ]] || err_exit '${#cc[@]} != 2'
193 [[ ${cc[two].y} == 3 ]] || err_exit '${cc[two].y} != 3'
194 (( cc[two].y == 3 )) || err_exit '(( cc[two].y != 3))'
195 [[ ${cc[two].colors[table]} == white ]] || err_exit '${cc[two].colors[table]} != white'
196 (( cc[two].len == 7 )) || err_exit '(( cc[two].len != 7 ))'
197 [[ $(cc[two].len) == 7 ]] || err_exit '$(cc[two].len) != 7 ))'
198 [[ ${cc[two].len} == 7 ]] || err_exit '${cc[two].len} != 7 ))'
199 (( cc[two].count == 2 )) || err_exit 'cc[two].count != 2'
201 (( cc[two].len == cc[one].len )) || err_exit 'cc[two].len != cc[one].len'
202 (( cc[two].count == 4 )) || err_exit 'cc[two].count != 4'
204 [[ ${cc[two]} == "${cc[three]}" ]] || err_exit ' ${cc[two]} != ${cc[three]}'
205 [[ $cc[two] == "${cc[three]}" ]] || err_exit ' $cc[two] != $cc[three]'
206 [[ ${#cc[@]} == 3 ]] || err_exit '${#cc[@]} != 3'