Results for type-compat.test.sh

statusoshosh-cpp
pass 22
N-I 55
total77
caseoshosh-cppdescription
0pass pass declare -i -l -u errors can be silenced - ignore_flags_not_impl
1N-I N-I declare -i with +=
detailsdetails
2N-I N-I declare -i with arithmetic inside strings (Nix, issue 864)
detailsdetails
3pass pass append in arith context
4N-I N-I declare array vs. string: mixing -a +a and () ''
detailsdetails
5N-I N-I declare array vs. associative array
detailsdetails
6N-I N-I declare -l -u
detailsdetails
4 passed, 0 OK, 10 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh1 declare -i with +=

stdout:
[1  2 ]
[1 2 ]
[x 2 ]
stderr:
  declare -i i
  ^~~~~~~
[ stdin ]:5: 'declare' doesn't implement flag -i (shopt --set ignore_flags_not_impl)
  declare -i j
  ^~~~~~~
[ stdin ]:9: 'declare' doesn't implement flag -i (shopt --set ignore_flags_not_impl)
osh-cpp1 declare -i with +=

stdout:
[1  2 ]
[1 2 ]
[x 2 ]
stderr:
  declare -i i
  ^~~~~~~
[ stdin ]:5: 'declare' doesn't implement flag -i (shopt --set ignore_flags_not_impl)
  declare -i j
  ^~~~~~~
[ stdin ]:9: 'declare' doesn't implement flag -i (shopt --set ignore_flags_not_impl)
osh2 declare -i with arithmetic inside strings (Nix, issue 864)

stdout:
s=1 + 2
item=array[1+1]
stderr:
  declare -i s
  ^~~~~~~
[ stdin ]:1: 'declare' doesn't implement flag -i (shopt --set ignore_flags_not_impl)
  declare -i item
  ^~~~~~~
[ stdin ]:6: 'declare' doesn't implement flag -i (shopt --set ignore_flags_not_impl)
osh-cpp2 declare -i with arithmetic inside strings (Nix, issue 864)

stdout:
s=1 + 2
item=array[1+1]
stderr:
  declare -i s
  ^~~~~~~
[ stdin ]:1: 'declare' doesn't implement flag -i (shopt --set ignore_flags_not_impl)
  declare -i item
  ^~~~~~~
[ stdin ]:6: 'declare' doesn't implement flag -i (shopt --set ignore_flags_not_impl)
osh4 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
osh-cpp4 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
osh5 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
osh-cpp5 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
osh6 declare -l -u

stdout:
FOO
foo
stderr:
  declare -l lower=FOO
  ^~~~~~~
[ stdin ]:1: Warning: OSH doesn't implement flags -l or -u (shopt --set ignore_flags_not_impl)
  declare -u upper=foo
  ^~~~~~~
[ stdin ]:2: Warning: OSH doesn't implement flags -l or -u (shopt --set ignore_flags_not_impl)
osh-cpp6 declare -l -u

stdout:
FOO
foo
stderr:
  declare -l lower=FOO
  ^~~~~~~
[ stdin ]:1: Warning: OSH doesn't implement flags -l or -u (shopt --set ignore_flags_not_impl)
  declare -u upper=foo
  ^~~~~~~
[ stdin ]:2: Warning: OSH doesn't implement flags -l or -u (shopt --set ignore_flags_not_impl)