arith-context () { run-file arith-context "$@" } run-file () { local spec_name=$1; shift; sh-spec spec/$spec_name.test.sh --compare-shells --oils-bin-dir $PWD/bin "$@" }
spec test index / oilshell.org
status | bash | mksh | zsh | osh | |
pass | 13 | 8 | 7 | 14 | |
ok | 1 | 0 | 3 | 0 | |
N-I | 0 | 2 | 1 | 0 | |
BUG | 0 | 4 | 3 | 0 | |
total | 14 | 14 | 14 | 14 | |
case | bash | mksh | zsh | osh | description |
0 | pass | pass | N-I | pass | Multiple right brackets inside expression |
details | |||||
1 | pass | pass | pass | pass | Slicing of string with constants |
2 | pass | pass | pass | pass | Slicing of string with variables |
3 | pass | pass | ok | pass | Array index on LHS of assignment |
details | |||||
4 | pass | pass | ok | pass | Array index on LHS with indices |
details | |||||
5 | pass | BUG | BUG | pass | Slicing of string with expressions |
details | details | ||||
6 | pass | BUG | BUG | pass | Ambiguous colon in slice |
details | details | ||||
7 | pass | pass | pass | pass | Triple parens should be disambiguated |
8 | pass | pass | pass | pass | Quadruple parens should be disambiguated |
9 | pass | N-I | pass | pass | ExprSub $[] happens to behave the same on simple cases |
details | |||||
10 | pass | pass | pass | pass | Empty expression (( )) $(( )) |
11 | pass | N-I | pass | pass | Empty expression for (( )) |
details | |||||
12 | pass | BUG | BUG | pass | Empty expression in ${a[@]: : } |
details | details | ||||
13 | ok | BUG | ok | pass | Empty expression a[] |
details | details | details |
42 passed, 4 OK, 3 not implemented, 7 BUG, 0 failed, 0 timeouts, 0 cases skipped
zsh | 0 Multiple right brackets inside expression stdout: stderr: |
zsh | 3 Array index on LHS of assignment stdout: X 2 3stderr: |
zsh | 4 Array index on LHS with indices stdout: X 2 3stderr: |
mksh | 5 Slicing of string with expressions stdout: stderr: mksh: <stdin>[3]: ${s:zero}: bad substitution |
zsh | 5 Slicing of string with expressions stdout: stderr: zsh: unrecognized modifier `z' |
mksh | 6 Ambiguous colon in slice stdout: 2stderr: mksh: <stdin>[3]: ${s: 0 < 1 ? 2 : 0 : 1}: bad substitution |
zsh | 6 Ambiguous colon in slice stdout: 2stderr: zsh: bad math expression: ':' expected |
mksh | 9 ExprSub $[] happens to behave the same on simple cases stdout: $[1 + 2] $[3 * 4]stderr: |
mksh | 11 Empty expression for (( )) stdout: stderr: mksh: <stdin>[1]: syntax error: '((' unexpected |
mksh | 12 Empty expression in ${a[@]: : } stdout: stderr: mksh: <stdin>[3]: ${a[@]: }: bad substitution |
zsh | 12 Empty expression in ${a[@]: : } stdout: slice a b c d e f status=0 slice status=0stderr: zsh: closing brace expected |
bash | 13 Empty expression a[] stdout: status=1 1 2 3 status=1stderr: bash: line 3: a[]: bad array subscript bash: line 7: ${a[]}: bad substitution |
mksh | 13 Empty expression a[] stdout: status=0 42 2 3 42 status=0stderr: |
zsh | 13 Empty expression a[] stdout: stderr: zsh: not an identifier: a[] |