spec test index / oilshell.org
| status | bash-4 | osh | |
| pass | 6 | 2 | |
| ok | 1 | 0 | |
| N-I | 0 | 5 | |
| total | 7 | 7 | |
| case | bash-4 | osh | description |
| 0 | ok | pass | declare -i -l -u errors can be silenced - ignore_flags_not_impl |
| details | |||
| 1 | pass | N-I | declare -i with += |
| details | |||
| 2 | pass | N-I | declare -i with arithmetic inside strings (Nix, issue 864) |
| details | |||
| 3 | pass | pass | append in arith context |
| 4 | pass | N-I | declare array vs. string: mixing -a +a and () '' |
| details | |||
| 5 | pass | N-I | declare array vs. associative array |
| details | |||
| 6 | pass | N-I | declare -l -u |
| details |
8 passed, 1 OK, 5 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped
| bash-4 | 0 declare -i -l -u errors can be silenced - ignore_flags_not_impl stdout: status=0 foo=5 status=0 bar=5stderr: bash-4.4: line 6: shopt: ignore_flags_not_impl: invalid shell option name |
| osh | 1 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 | 2 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 | 4 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 | 5 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 | 6 declare -l -u stdout: FOO foostderr: 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) |