Lines Matching refs:array

168 then    err_exit 'error in array conversion from int to R12'
171 then err_exit 'error in count of array conversion from int to R12'
175 set | grep '^abcdefg$' >/dev/null && err_exit 'empty array variable in set list'
193 then err_exit 'conversion of indexed to associative array failed'
230 then err_exit 'execution trace side effects with array subscripts'
241 then err_exit 'array not restored after subshell'
251 then err_exit 'array offset of -1 not working'
254 then err_exit 'array offset of -3:1 not working'
261 then err_exit 'array getting unset before right hand side evaluation'
267 then err_exit 'exporting indexed array not exporting 0-th element'
276 err_exit 'exporting associative array not exporting 0-th element'
283 [[ $foo == 0 ]] || err_exit 'zero element of associative array not being set'
295 [[ ${x[1]} == 2 ]] || err_exit 'index array produce side effects in subshells'
299 [[ ${#x[@]} == 4 ]] || err_exit 'index array append in subshell error'
301 [[ ${#x[@]} == 3 ]] || err_exit 'index array append in subshell effects parent'
304 [[ ${x[two]} == 2 ]] || err_exit 'associative array produce side effects in subshells'
309 [[ ${#x[@]} == 4 ]] || err_exit 'associative array append in subshell error'
311 [[ ${#x[@]} == 3 ]] || err_exit 'associative array append in subshell effects parent'
327 ) 2> /dev/null && err_exit 'set +A with associative array should be an error'
333 [[ $bam == value ]] && err_exit 'unset associative array element error'
334 : only first element of an array can be exported
338 [[ $($SHELL -c "var=(foo bar);export var;$tmp/script") == foo ]] || err_exit 'export array not exporting just first element'
375 [[ $(typeset | grep foo$) == *associative* ]] || err_exit 'array lost associative attribute'
376 [[ ! ${foo[@]} ]] || err_exit 'array not empty'
377 [[ ! ${!foo[@]} ]] || err_exit 'array names not empty'
396 [[ ${bar[${foo[5]}]} == 3 ]] || err_exit 'array subscript cannot be an array instance'
402 [[ $x == 4 ]] && err_exit '$bar[4] should not be an array in an assignment'
418 ) == val=4 ]] 2> /dev/null || err_exit 'after reading array[j] and assign array[j] fails'
424 ) == name ]] 2> /dev/null || err_exit 'indexed array in compound variable not working'
434 [[ $(typeset | grep 'foo$') == *index* ]] || err_exit 'typeset -a not creating an indexed array'
436 [[ $(typeset | grep 'foo$') == *index* ]] || err_exit 'append to indexed array not preserving array type'
443 [[ $($SHELL -c 'typeset -a foo;typeset | grep "foo$"' 2> /dev/null) == *index* ]] || err_exit 'typeset fails for indexed array with no elements'
445 [[ $(typeset | grep xxxxx$) == *'indexed array'* ]] || err_exit 'array of one element not an indexed array'
451 [[ ${@x.foo} == 'typeset -a'* ]] || err_exit 'x.foo is not an indexed array'
453 [[ ${@x.foo} == 'typeset -A'* ]] || err_exit 'x.foo is not an associative array'
454 $SHELL -c $'x=(foo\n\tbar\nbam\n)' 2> /dev/null || err_exit 'compound array assignment with new-lines not working'
455 $SHELL -c $'x=(foo\n\tbar:\nbam\n)' 2> /dev/null || err_exit 'compound array assignment with labels not working'
456 $SHELL -c $'x=(foo\n\tdone\nbam\n)' 2> /dev/null || err_exit 'compound array assignment with reserved words not working'
463 [[ ${!a[@]} == z ]] || err_exit '"unset a[a]" unsets entire array'
480 [[ ${#FILTER[@]} == 2 ]] || err_exit "FILTER array should have two elements not ${#FILTER[@]}"
489 [[ $z == sub=1 ]] || err_exit 'get function not invoked for index array'
499 [[ $z == sub=1 ]] || err_exit 'get function not invoked for associative array'
505 [[ $y == 22 ]] || err_exit 'typeset -m for index array not working'
506 [[ ${a[i]} || ${a[0]} != 11 ]] && err_exit 'typeset -m for index array not deleting element'
511 [[ $y == 22 ]] || err_exit 'typeset -m for associative array not working'
512 [[ ${a[$i]} || ${a[0]} != 11 ]] && err_exit 'typeset -m for associative array not deleting element'
519 [[ ${a[@]} == 'bb aa cc' ]] || err_exit 'moving index array elements not working'
526 [[ ${a[@]} == 'bb aa cc' ]] || err_exit 'moving associative array elements not working'
532 [[ ${x[1][@]} == 'a b c' ]] || err_exit 'moving indexed array to index array element not working'
537 [[ ${x[1][@]} == 'a b c' ]] || err_exit 'moving associative array to index array element not working'
566 [[ ${#arr2[@]} == 0 ]] || err_exit 'declartion "typeset array[6]" should not show any elements'
569 [[ ${arr2[1]} == def ]] || err_exit 'declaration "typeset array[6]" causes arrays causes wrong side effects'
575 a=123 $SHELL 2> /dev/null -c 'integer a[5]=3 a[2]=4; unset a;x=0; ((a[++x]++));:' || err_exit 'unsetting array variable leaves side effect'
580 [[ ${foo[@]} == 'bb cc' ]] || err_exit "indexed array assignment using parts of array for values gives wrong result of ${foo[@]}"
585 [[ ${foo[@]} == 'bb cc' ]] || err_exit "associative array assignment using parts of array for values gives wrong result of ${foo[@]}"
589 [[ ${foo[1]} == def=2 ]] || err_exit "index array with elements containing = not working"
611 [[ $x == "$exp" ]] || err_exit 'setting element 1 of array to compound variable failed'
613 #test for cloning a very large index array - can core dump
634 ) 2> /dev/null || err_exit 'copying a large array fails'
639 [[ ${foo[0]} == bar ]] || 'appending to empty array not working'
646 [[ ${isnull[*]} != *N* ]] && err_exit 'bug after ${arr[@]} with one element associative array'
652 [[ $(typeset -p arr2) ]] && err_exit 'unset associative array of compound variables not working'