spec test index / oilshell.org
case | dash | bash | mksh | zsh | osh | osh_ALT | osh-byterun | description |
0 | N-I | pass | pass | ok | pass | pass | pass | Side Effect in Array Indexing |
details | details | |||||||
1 | pass | pass | pass | pass | pass | pass | pass | Add one to var |
2 | pass | pass | pass | pass | pass | pass | pass | $ is optional |
3 | pass | pass | pass | pass | pass | pass | pass | SimpleVarSub within arith |
4 | pass | pass | pass | pass | pass | pass | pass | BracedVarSub within ArithSub |
5 | pass | pass | pass | pass | pass | pass | pass | Arith word part |
6 | pass | pass | pass | pass | pass | pass | pass | Arith sub with word parts |
7 | N-I | N-I | pass | N-I | pass | pass | pass | Constant with quotes like '1' |
details | details | details | ||||||
8 | pass | pass | pass | pass | pass | pass | pass | Arith sub within arith sub |
9 | pass | pass | pass | pass | pass | pass | pass | Backticks within arith sub |
10 | ok | ok | ok | ok | ok | ok | ok | Invalid string to int |
details | details | details | details | details | details | details | ||
11 | N-I | N-I | N-I | N-I | pass | pass | pass | Invalid string to int with strict-arith |
details | details | details | details | |||||
12 | pass | pass | pass | pass | pass | pass | pass | Newline in the middle of expression |
13 | pass | pass | pass | pass | pass | pass | pass | Ternary operator |
14 | N-I | pass | pass | pass | pass | pass | pass | Preincrement |
details | ||||||||
15 | N-I | pass | pass | pass | pass | pass | pass | Postincrement |
details | ||||||||
16 | N-I | pass | pass | pass | pass | pass | pass | Increment undefined variables |
details | ||||||||
17 | N-I | pass | pass | BUG | pass | pass | pass | Increment and decrement array |
details | details | |||||||
18 | ok | pass | BUG | BUG | pass | pass | pass | Increment undefined variables with nounset |
details | details | details | ||||||
19 | N-I | pass | pass | pass | pass | pass | pass | Comma operator (borrowed from C) |
details | ||||||||
20 | pass | pass | pass | pass | pass | pass | pass | Augmented assignment |
21 | pass | pass | pass | pass | pass | pass | pass | Comparison Ops |
22 | pass | pass | pass | pass | pass | pass | pass | Logical Ops |
23 | N-I | pass | pass | pass | pass | pass | pass | Logical Ops Short Circuit |
details | ||||||||
24 | pass | pass | pass | pass | pass | pass | pass | Bitwise ops |
25 | pass | pass | pass | pass | pass | pass | pass | Unary minus and plus |
26 | pass | ok | ok | BUG | pass | pass | pass | No floating point |
details | details | details | ||||||
27 | N-I | pass | pass | ok | pass | pass | pass | Array indexing in arith |
details | details | |||||||
28 | N-I | pass | pass | pass | pass | pass | pass | Constants in base 36 |
details | ||||||||
29 | N-I | pass | N-I | N-I | pass | pass | pass | Constants in bases 2 to 64 |
details | details | details | ||||||
30 | N-I | pass | pass | pass | pass | pass | pass | Dynamic base constants |
details | ||||||||
31 | pass | pass | N-I | N-I | pass | pass | pass | Octal constant |
details | details | |||||||
32 | pass | pass | N-I | N-I | pass | pass | pass | Dynamic octal constant |
details | details | |||||||
33 | pass | pass | pass | pass | pass | pass | pass | Dynamic hex constants |
34 | pass | pass | pass | pass | FAIL | FAIL | FAIL | Dynamic var names - result of runtime parse/eval |
details | details | details | ||||||
35 | N-I | pass | pass | pass | FAIL | FAIL | FAIL | Bizarre recursive name evaluation - result of runtime parse/eval |
details | details | details | details | |||||
36 | BUG | pass | BUG | BUG | pass | pass | pass | nounset with arithmetic |
details | details | details | ||||||
37 | BUG | BUG | BUG | BUG | pass | pass | pass | Integer Overflow |
details | details | details | details | |||||
38 | N-I | ok | ok | ok | pass | pass | pass | Invalid LValue |
details | details | details | details | |||||
39 | N-I | ok | ok | ok | pass | pass | pass | Invalid LValue that looks like array |
details | details | details | details | |||||
40 | N-I | ok | ok | ok | pass | pass | pass | Invalid LValue: two sets of brackets |
details | details | details | details | |||||
41 | pass | pass | pass | pass | pass | pass | pass | Operator Precedence |
42 | N-I | pass | N-I | pass | pass | pass | pass | Exponentiation with ** |
details | details | |||||||
43 | N-I | pass | N-I | pass | pass | pass | pass | Exponentiation operator has buggy precedence |
details | details | |||||||
44 | N-I | pass | pass | ok | pass | pass | pass | Negative exponent |
details | details |
243 passed, 22 ok, 33 known unimplemented, 11 known bugs, 2 failed, 0 skipped
dash | 0 Side Effect in Array Indexing stdout: stderr: _tmp/spec-bin/dash: 1: Syntax error: "(" unexpected |
zsh | 0 Side Effect in Array Indexing stdout: 5 b=2stderr: |
dash | 7 Constant with quotes like '1' stdout: stderr: _tmp/spec-bin/dash: 1: arithmetic expression: expecting primary: "'1' + 2" |
bash | 7 Constant with quotes like '1' stdout: stderr: _tmp/spec-bin/bash: line 1: '1' + 2: syntax error: operand expected (error token is "'1' + 2") |
zsh | 7 Constant with quotes like '1' stdout: stderr: zsh: bad math expression: illegal character: ' |
dash | 10 Invalid string to int stdout: stderr: _tmp/spec-bin/dash: 2: Illegal number: foo |
bash | 10 Invalid string to int stdout: 5stderr: |
mksh | 10 Invalid string to int stdout: 5stderr: |
zsh | 10 Invalid string to int stdout: 5stderr: |
osh | 10 Invalid string to int stdout: 5stderr: Line 2 of '<stdin>' echo $((s+5)) ^ osh warning: Invalid integer constant 'foo' |
osh_ALT | 10 Invalid string to int stdout: 5stderr: Line 2 of '<stdin>' echo $((s+5)) ^ osh warning: Invalid integer constant 'foo' |
osh-byterun | 10 Invalid string to int stdout: 5stderr: Line 2 of '<stdin>' echo $((s+5)) ^ osh warning: Invalid integer constant 'foo' |
dash | 11 Invalid string to int with strict-arith stdout: stderr: _tmp/spec-bin/dash: 1: set: Illegal option -o strict-arith |
bash | 11 Invalid string to int with strict-arith stdout: foo 5 should not get herestderr: _tmp/spec-bin/bash: line 1: set: strict-arith: invalid option name |
mksh | 11 Invalid string to int with strict-arith stdout: stderr: _tmp/spec-bin/mksh: <stdin>[1]: set: strict-arith: bad option |
zsh | 11 Invalid string to int with strict-arith stdout: stderr: set: no such option: strict-arith |
dash | 14 Preincrement stdout: 4 4stderr: |
dash | 15 Postincrement stdout: stderr: _tmp/spec-bin/dash: 2: arithmetic expression: expecting primary: "a++" |
dash | 16 Increment undefined variables stdout: [][]stderr: _tmp/spec-bin/dash: 1: undef1++: not found _tmp/spec-bin/dash: 2: ++undef2: not found |
dash | 17 Increment and decrement array stdout: stderr: _tmp/spec-bin/dash: 1: Syntax error: "(" unexpected |
zsh | 17 Increment and decrement array stdout: 5 6 7 8 -stderr: zsh: a: assignment to invalid subscript range zsh: undef: assignment to invalid subscript range |
dash | 18 Increment undefined variables with nounset stdout: stderr: _tmp/spec-bin/dash: 2: undef1++: not found _tmp/spec-bin/dash: 3: ++undef2: not found _tmp/spec-bin/dash: 4: undef1: parameter not set |
mksh | 18 Increment undefined variables with nounset stdout: [1][1]stderr: |
zsh | 18 Increment undefined variables with nounset stdout: [1][1]stderr: |
dash | 19 Comma operator (borrowed from C) stdout: stderr: _tmp/spec-bin/dash: 3: arithmetic expression: expecting EOF: "a,(b+1)" |
dash | 23 Logical Ops Short Circuit stdout: 11 11 11 11stderr: _tmp/spec-bin/dash: 2: 1: not found _tmp/spec-bin/dash: 2: x: not found _tmp/spec-bin/dash: 4: 0: not found _tmp/spec-bin/dash: 4: x: not found _tmp/spec-bin/dash: 6: 0: not found _tmp/spec-bin/dash: 8: 1: not found |
bash | 26 No floating point stdout: stderr: _tmp/spec-bin/bash: line 1: 1 + 2.3: syntax error: invalid arithmetic operator (error token is ".3") |
mksh | 26 No floating point stdout: stderr: _tmp/spec-bin/mksh: <stdin>[1]: 1 + 2.3: unexpected '.' |
zsh | 26 No floating point stdout: 3.2999999999999998stderr: |
dash | 27 Array indexing in arith stdout: stderr: _tmp/spec-bin/dash: 1: Syntax error: "(" unexpected |
zsh | 27 Array indexing in arith stdout: 7stderr: |
dash | 28 Constants in base 36 stdout: stderr: _tmp/spec-bin/dash: 1: arithmetic expression: expecting EOF: "36#a" |
dash | 29 Constants in bases 2 to 64 stdout: stderr: _tmp/spec-bin/dash: 1: arithmetic expression: expecting EOF: "64#a" |
mksh | 29 Constants in bases 2 to 64 stdout: stderr: _tmp/spec-bin/mksh: <stdin>[1]: 64#a: bad number '64#a' |
zsh | 29 Constants in bases 2 to 64 stdout: stderr: zsh: invalid base (must be 2 to 36 inclusive): 64 |
dash | 30 Dynamic base constants stdout: stderr: _tmp/spec-bin/dash: 2: arithmetic expression: expecting EOF: " 16#a " |
mksh | 31 Octal constant stdout: 11stderr: |
zsh | 31 Octal constant stdout: 11stderr: |
mksh | 32 Dynamic octal constant stdout: 11stderr: |
zsh | 32 Dynamic octal constant stdout: 11stderr: |
osh | 34 Dynamic var names - result of runtime parse/eval [osh stdout] Expected '11\n', got '6\n' stdout: 6stderr: Line 3 of '<stdin>' echo $(( foo + f$x + 1 )) ^ osh warning: Invalid integer constant 'foo' |
osh_ALT | 34 Dynamic var names - result of runtime parse/eval [osh_ALT stdout] Expected '11\n', got '6\n' stdout: 6stderr: Line 3 of '<stdin>' echo $(( foo + f$x + 1 )) ^ osh warning: Invalid integer constant 'foo' |
osh-byterun | 34 Dynamic var names - result of runtime parse/eval [osh-byterun stdout] Expected '11\n', got '6\n' stdout: 6stderr: Line 3 of '<stdin>' echo $(( foo + f$x + 1 )) ^ osh warning: Invalid integer constant 'foo' |
dash | 35 Bizarre recursive name evaluation - result of runtime parse/eval stdout: stderr: _tmp/spec-bin/dash: 5: Illegal number: foo |
osh | 35 Bizarre recursive name evaluation - result of runtime parse/eval [osh stdout] Expected '6 6 6 6\n', got '6 1 1 1\n' stdout: 6 1 1 1stderr: Line 5 of '<stdin>' echo $((foo+1)) $((bar+1)) $((spam+1)) $((eggs+1)) ^~~ osh warning: Invalid integer constant 'foo' Line 5 of '<stdin>' echo $((foo+1)) $((bar+1)) $((spam+1)) $((eggs+1)) ^~~~ osh warning: Invalid integer constant 'bar' Line 5 of '<stdin>' echo $((foo+1)) $((bar+1)) $((spam+1)) $((eggs+1)) ^~~~ osh warning: Invalid integer constant 'spam' |
osh_ALT | 35 Bizarre recursive name evaluation - result of runtime parse/eval [osh_ALT stdout] Expected '6 6 6 6\n', got '6 1 1 1\n' stdout: 6 1 1 1stderr: Line 5 of '<stdin>' echo $((foo+1)) $((bar+1)) $((spam+1)) $((eggs+1)) ^~~ osh warning: Invalid integer constant 'foo' Line 5 of '<stdin>' echo $((foo+1)) $((bar+1)) $((spam+1)) $((eggs+1)) ^~~~ osh warning: Invalid integer constant 'bar' Line 5 of '<stdin>' echo $((foo+1)) $((bar+1)) $((spam+1)) $((eggs+1)) ^~~~ osh warning: Invalid integer constant 'spam' |
osh-byterun | 35 Bizarre recursive name evaluation - result of runtime parse/eval [osh-byterun stdout] Expected '6 6 6 6\n', got '6 1 1 1\n' stdout: 6 1 1 1stderr: Line 5 of '<stdin>' echo $((foo+1)) $((bar+1)) $((spam+1)) $((eggs+1)) ^~~ osh warning: Invalid integer constant 'foo' Line 5 of '<stdin>' echo $((foo+1)) $((bar+1)) $((spam+1)) $((eggs+1)) ^~~~ osh warning: Invalid integer constant 'bar' Line 5 of '<stdin>' echo $((foo+1)) $((bar+1)) $((spam+1)) $((eggs+1)) ^~~~ osh warning: Invalid integer constant 'spam' |
dash | 36 nounset with arithmetic stdout: should not get here: x=5stderr: |
mksh | 36 nounset with arithmetic stdout: should not get here: x=5stderr: |
zsh | 36 nounset with arithmetic stdout: should not get here: x=5stderr: |
dash | 37 Integer Overflow stdout: -1996229794797103359stderr: |
bash | 37 Integer Overflow stdout: -1996229794797103359stderr: |
mksh | 37 Integer Overflow stdout: -15640831stderr: |
zsh | 37 Integer Overflow stdout: -1996229794797103359stderr: |
dash | 38 Invalid LValue stdout: stderr: _tmp/spec-bin/dash: 2: Syntax error: word unexpected (expecting ")") |
bash | 38 Invalid LValue stdout: 9stderr: _tmp/spec-bin/bash: line 2: ((: (a + 2) = 3 : attempted assignment to non-variable (error token is "= 3 ") |
mksh | 38 Invalid LValue stdout: 9stderr: _tmp/spec-bin/mksh: <stdin>[2]: (a + 2) = 3 : = requires lvalue |
zsh | 38 Invalid LValue stdout: 9stderr: zsh: bad math expression: lvalue required |
dash | 39 Invalid LValue that looks like array stdout: status=127stderr: _tmp/spec-bin/dash: 1: 1[2]: not found |
bash | 39 Invalid LValue that looks like array stdout: status=1stderr: _tmp/spec-bin/bash: line 1: ((: 1[2] = 3 : syntax error: invalid arithmetic operator (error token is "[2] = 3 ") |
mksh | 39 Invalid LValue that looks like array stdout: status=2stderr: _tmp/spec-bin/mksh: <stdin>[1]: 1[2] = 3 : unexpected '[' |
zsh | 39 Invalid LValue that looks like array stdout: status=2stderr: zsh: bad base syntax |
dash | 40 Invalid LValue: two sets of brackets stdout: status=127stderr: _tmp/spec-bin/dash: 1: a[1][2]: not found |
bash | 40 Invalid LValue: two sets of brackets stdout: status=1stderr: _tmp/spec-bin/bash: line 1: ((: a[1][2] = 3 : syntax error: invalid arithmetic operator (error token is "[2] = 3 ") |
mksh | 40 Invalid LValue: two sets of brackets stdout: status=2stderr: _tmp/spec-bin/mksh: <stdin>[1]: a[1][2] = 3 : unexpected '[' |
zsh | 40 Invalid LValue: two sets of brackets stdout: status=2stderr: zsh: bad base syntax |
dash | 42 Exponentiation with ** stdout: stderr: _tmp/spec-bin/dash: 1: arithmetic expression: expecting primary: " 3 ** 0 " |
mksh | 42 Exponentiation with ** stdout: stderr: _tmp/spec-bin/mksh: <stdin>[1]: 3 ** 0 : unexpected '*' |
dash | 43 Exponentiation operator has buggy precedence stdout: stderr: _tmp/spec-bin/dash: 1: arithmetic expression: expecting primary: " -3 ** 2 " |
mksh | 43 Exponentiation operator has buggy precedence stdout: stderr: _tmp/spec-bin/mksh: <stdin>[1]: -3 ** 2 : unexpected '*' |
dash | 44 Negative exponent stdout: stderr: _tmp/spec-bin/dash: 1: arithmetic expression: expecting primary: " 2**-1 * 5 " |
zsh | 44 Negative exponent stdout: 2.5stderr: |