Lines Matching defs:err_exit

20 function err_exit
26 alias err_exit='err_exit $LINENO'
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'
56 then err_exit 'copying integer field of compound object not working'
66 then err_exit 'compound assignemnt of associative arrays not working'
73 then err_exit 'name references not expanded on prefix matching'
80 [[ ${x.foo.bar} == 7 ]] || err_exit '[[ ${x.foo.bar} != 7 ]]'
81 (( x.foo.bar == 7 ))|| err_exit '(( x.foo.bar != 7 ))'
82 [[ ${x.foo} == *bar=7* ]] || err_exit '[[ ${x.foo} != *bar=7* ]]'
86 then err_exit "compound variable with integer subvariable not working"
89 err_exit '[[ ... ]] not working after compound assignment'
91 [[ ${!foo.@} ]] && err_exit 'unset compound variable leaves subvariables'
183 [[ "${suitable}" == *entrylist=* ]] || err_exit 'compound variable expansion omitting fields'
185 [[ $foo == *bar=foo* ]] || err_exit 'no prefix elements in compound variable output'
189 (( (point.x*point.x + point.y*point.y) == 25 )) || err_exit "local compound variable not working"
193 (( (point.x*point.x + point.y*point.y) == 100 )) || err_exit "global compound variable not preserved"
194 [[ $($SHELL -c 'foo=();foo.[x]=(y z); print ${foo.x[@]}') == 'y z' ]] 2> /dev/null || err_exit 'foo=( [x]=(y z) not working'
202 (( (point.x*point.x + point.y*point.y) == 25 )) || err_exit "local compound variable not working"
207 (( (point.x*point.x + point.y*point.y) == 100 )) || err_exit "global compound variable not preserved"
208 [[ $(staticvar x) == $'(\n\ttypeset -i x=3\n\ttypeset -i y=5\n\tz=foobar\n)' ]] || err_exit 'static variables in function not working'
210 ( typeset -S x=+++)2> /dev/null || err_exit "typeset -S doesn't unset first"
213 ( [[ ${z.foo.bar:-abc} == abc ]] 2> /dev/null) || err_exit ':- not working with compound variables'
216 [[ ${stack.items[0]} == foo ]] || err_exit 'typeset -a variable not expanding correctly'
217 $SHELL -c 'typeset -a info=( [1]=( passwd=( since=2005-07-20) ))' || err_exit 'problem with embedded index array in compound variable'
219 [[ $x == *'.y'=* ]] && err_exit 'expansion with bogus leading . in name'
225 [[ ${a.z} == 3 ]] && err_exit "\${a.z} should not be 3"
229 [[ ${a.z} == 3 ]] && err_exit 'a.z should not be set to 3'
235 [[ ${b.b1} == foo ]] || err_exit '${b.b1} should be foo'
249 [[ ${ a=123;} == 'a=123' ]] || err_exit 'should be a=123'
251 [[ ${ b.x=456;} == 'b.x=456' ]] || err_exit 'should be b.x=456'
255 [[ ${ b.x=789;} == 'b.x=789' ]] || err_exit 'should be b.x=789'
265 [[ $X == $'(\n\tfoo=1\n)' ]] || err_exit 'scoping problem with compound variables'
268 [[ ${foo[c]} == cc ]] || err_exit 'associative array assignment with; not working'
269 [[ $({ $SHELL -c 'x=(); typeset -a x.foo; x.foo=bar; print -r -- "$x"' ;} 2> /dev/null) == $'(\n\ttypeset -a foo=bar\n)' ]] || err_exit 'indexed array in compound variable with only element 0 defined fails'
272 [[ $foo == *'typeset -a bar'* ]] || err_exit 'array attribute -a not preserved in compound variable'
275 [[ ${s[@]} == *z=*z=* ]] || err_exit 'missing elements in compound associative array'
279 [[ ${nodes[0].x} == 5 ]] || err_exit '${nodes[0].x} should be 5'
283 [[ $foo == $'(\n\tbar=abc\n)' ]] || err_exit 'typeset -C not working for foo'
285 [[ $foo == $'(\n\tbar=def\n)' ]] || err_exit 'typeset -C not working when initialized'
304 [[ $? == 0 ]] || err_exit ' read -C failed'
305 [[ $bar == "$foo" ]] || err_exit '$foo != $bar'
306 [[ $bam == "$foo2" ]] || err_exit '$foo2 != $bmr'
307 [[ $REPLY == 'last line' ]] || err_exit "\$REPLY=$REPLY should be 'last line"
310 [[ $x == "$y" ]] || err_exit '$x.foo != $y.foo with %B'
312 [[ $x == "$y" ]] || err_exit '$x.foo != $y.foo with %#B'
314 [[ $x == "$y" ]] || err_exit '$x != $y with %B'
316 [[ $x == "$y" ]] || err_exit '$x != $y with %#B'
319 [[ $x == "$y" ]] || err_exit '$x != $y with set | grep'
323 [[ $x == "$y" ]] || err_exit '$x != $y with typeset -C'
327 [[ $x == "$y" ]] || err_exit '$x != $y when x=y and x and y are -C '
332 [[ $x == "$z" ]] || err_exit '$x != $z when x=z and x and z are -C '
335 [[ $x == "$y" ]] || err_exit '$x != $y when x=y -C copied in a function '
338 [[ $y == *foo=abc* ]] || err_exit 'z not appended to y'
340 [[ $x == "$y" ]] || err_exit '$x != $y when y.foo deleted'
345 [[ $x == $'(\n)' ]] || err_exit 'unset compound variable is not empty'
375 err_exit "compound indexed array pretty print failed -- expected $exp, got $got"
391 err_exit "compound indexed array pretty print failed -- expected $exp, got $got"
407 err_exit "compound indexed array pretty print failed -- expected $exp, got $got"
425 [[ $data == %(()) ]] || err_exit "unbalanced parenthesis with compound variable containing array of compound variables"
427 [[ $(typeset -p hello) == 'typeset -C -A hello=([foo]=bar)' ]] || err_exit 'typeset -A -C with intial assignment not working'
429 [[ $($SHELL -c 'foo=(x=3 y=4);function bar { typeset z=4;: $z;};bar;print ${!foo.@}') == 'foo.x foo.y' ]] 2> /dev/null || err_exit '${!foo.@} after function not working'
437 foo 2> /dev/null <<- \EOF || err_exit 'deleting compound variable in function failed'
461 [[ $(typeset -p mica01) == "$expected" ]] || err_exit 'appened to indexed array compound variable not working'
465 [[ ! -v x.x ]] && err_exit 'x.x should be set'
467 [[ $(print -v x) == "$expected" ]] || err_exit "'print -v x' should be $expected"
496 [[ "${foo1[1234]}" == "${foo2[1234]}" ]] || err_exit "test failed\n$(diff -u <( print -r -- "${foo1[1234]}") <(print -r -- "${foo2[1234]}"))."
512 [[ $tree == "$expected" ]] || err_exit 'move of compound local variable to global variable not working'
517 [[ $(typeset -p array) == "$expected" ]] || err_exit 'typeset with compound variable with compound variable array not working'
532 [[ $output == *end=* ]] || err_exit "The field 'name' end is missing"
539 [[ $x == *f=2* ]] || err_exit "The field b containg 'f=2' is missing"