spec test index / oilshell.org
status | bash | osh | |
pass | 3 | 1 | |
N-I | 0 | 4 | |
FAIL | 2 | 0 | |
total | 5 | 5 | |
case | bash | osh | description |
0 | pass | N-I | declare -i with += |
details | |||
1 | pass | N-I | declare -i with arithmetic inside strings (Nix, issue 864) |
details | |||
2 | FAIL | pass | append in arith context |
details | |||
3 | pass | N-I | declare array vs. string: mixing -a +a and () '' |
details | |||
4 | FAIL | N-I | declare array vs. associative array |
details | details |
4 passed, 0 OK, 4 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped
osh | 0 declare -i with += stdout: [1 2 ] [1 2 ] [x 2 ]stderr: |
osh | 1 declare -i with arithmetic inside strings (Nix, issue 864) stdout: s=1 + 2 item=array[1+1]stderr: |
bash | 2 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 ' ") |
osh | 3 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 |
bash | 4 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: |
osh | 4 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 |