Results for type-compat.test.sh

statusbashosh
pass 31
N-I 04
FAIL 20
total55
casebashoshdescription
0pass N-I declare -i with +=
details
1pass N-I declare -i with arithmetic inside strings (Nix, issue 864)
details
2FAIL pass append in arith context
details
3pass N-I declare array vs. string: mixing -a +a and () ''
details
4FAIL N-I declare array vs. associative array
detailsdetails
4 passed, 0 OK, 4 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh0 declare -i with +=

stdout:
[1  2 ]
[1 2 ]
[x 2 ]
stderr:
osh1 declare -i with arithmetic inside strings (Nix, issue 864)

stdout:
s=1 + 2
item=array[1+1]
stderr:
bash2 append in arith context

[bash stdout] Expected '3|3|2\n', got '||\n'

stdout:
||
stderr:
bash: line 2: ((: s='1 ': syntax error: operand expected (error token is "'1 '")
bash: line 3: ((: s+=' 2 ': syntax error: operand expected (error token is "' 2 '")
bash: line 5: ((: i='1 ' : syntax error: operand expected (error token is "'1 ' ")
bash: line 6: ((: i+=' 2 ' : syntax error: operand expected (error token is "' 2 ' ")
bash: line 8: ((: j='x ' : syntax error: operand expected (error token is "'x ' ")
bash: line 9: ((: j+=' 2 ' : syntax error: operand expected (error token is "' 2 ' ")
osh3 declare array vs. string: mixing -a +a and () ''

stdout:
['', '']
stderr:
  declare +a 'xyz1=1'
          ^
[ stdin ]:1: 'declare' doesn't accept option +a
  declare +a 'xyz2=(2 3)'
          ^
[ stdin ]:2: 'declare' doesn't accept option +a
  declare -a 'xyz3=4'
             ^
[ stdin ]:3: 'declare' Got -a but RHS isn't an array
  declare -a 'xyz4=(5 6)'
             ^
[ stdin ]:4: 'declare' Got -a but RHS isn't an array
bash4 declare array vs. associative array

[bash stdout] Expected "['1', '0', 'd']\n['2', 'a', 'c', 'b', 'd']\n" Got "['1', '0', 'd']\n['2', 'c', 'a', 'd', 'b']\n"

stdout:
['1', '0', 'd']
['2', 'c', 'a', 'd', 'b']
stderr:
osh4 declare array vs. associative array

stdout:
['0']
['0']
stderr:
  declare -a 'array=([a]=b [c]=d)'
             ^
[ stdin ]:1: 'declare' Got -a but RHS isn't an array
  declare -A 'assoc=([a]=b [c]=d)'
             ^
[ stdin ]:2: 'declare' Got -A but RHS isn't an associative array