spec test index / oilshell.org
278 passed, 30 OK, 46 not implemented, 18 BUG, 0 failed, 0 timeouts, 0 cases skipped
dash | 0 Side Effect in Array Indexing stdout: stderr: 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: dash: 1: arithmetic expression: expecting primary: "'1' + 2" |
bash | 7 Constant with quotes like '1' stdout: stderr: 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: dash: 1: shopt: not found dash: 3: Illegal number: foo |
bash | 10 Invalid string to int stdout: 5stderr: bash: line 1: shopt: strict_arith: invalid shell option name |
mksh | 10 Invalid string to int stdout: 5stderr: mksh: <stdin>[1]: shopt: not found |
zsh | 10 Invalid string to int stdout: 5stderr: zsh: command not found: shopt |
osh | 10 Invalid string to int stdout: 5stderr: |
osh_ALT | 10 Invalid string to int stdout: 5stderr: |
dash | 11 Invalid string to int with strict_arith stdout: foostderr: dash: 1: shopt: not found dash: 4: Illegal number: foo |
bash | 11 Invalid string to int with strict_arith stdout: foo 5 should not get herestderr: bash: line 1: shopt: strict_arith: invalid shell option name |
mksh | 11 Invalid string to int with strict_arith stdout: foo 5 should not get herestderr: mksh: <stdin>[1]: shopt: not found |
zsh | 11 Invalid string to int with strict_arith stdout: foo 5 should not get herestderr: zsh: command not found: shopt |
dash | 14 Preincrement stdout: 4 4stderr: |
dash | 15 Postincrement stdout: stderr: dash: 2: arithmetic expression: expecting primary: "a++" |
dash | 16 Increment undefined variables stdout: [][]stderr: dash: 1: shopt: not found dash: 2: undef1++: not found dash: 3: ++undef2: not found |
dash | 17 Increment and decrement array elements stdout: stderr: dash: 1: shopt: not found dash: 2: Syntax error: "(" unexpected |
zsh | 17 Increment and decrement array elements stdout: 5 6 7 8 -stderr: zsh: command not found: shopt zsh: a: assignment to invalid subscript range zsh: undef: assignment to invalid subscript range |
dash | 18 Increment undefined variables with nounset stdout: stderr: dash: 2: undef1++: not found dash: 3: ++undef2: not found 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: dash: 3: arithmetic expression: expecting EOF: "a,(b+1)" |
dash | 23 Logical Ops Short Circuit stdout: 11 11 11 11stderr: dash: 2: 1: not found dash: 2: x: not found dash: 4: 0: not found dash: 4: x: not found dash: 6: 0: not found dash: 8: 1: not found |
bash | 26 No floating point stdout: stderr: bash: line 1: 1 + 2.3: syntax error: invalid arithmetic operator (error token is ".3") |
mksh | 26 No floating point stdout: stderr: mksh: <stdin>[1]: 1 + 2.3: unexpected '.' |
zsh | 26 No floating point stdout: 3.2999999999999998stderr: |
dash | 27 Array indexing in arith stdout: stderr: dash: 1: Syntax error: "(" unexpected |
zsh | 27 Array indexing in arith stdout: 7stderr: |
dash | 28 Constants in base 36 stdout: stderr: dash: 1: arithmetic expression: expecting EOF: "36#a" |
dash | 29 Constants in bases 2 to 64 stdout: stderr: dash: 1: arithmetic expression: expecting EOF: "64#a" |
mksh | 29 Constants in bases 2 to 64 stdout: stderr: 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 Multiple digit constants with base N stdout: stderr: dash: 1: arithmetic expression: expecting EOF: "10#0123" |
dash | 31 Dynamic base constants stdout: stderr: dash: 2: arithmetic expression: expecting EOF: " 16#a " |
mksh | 32 Octal constant stdout: 11stderr: |
zsh | 32 Octal constant stdout: 11stderr: |
mksh | 33 Dynamic octal constant stdout: 11stderr: |
zsh | 33 Dynamic octal constant stdout: 11stderr: |
dash | 36 Recursive name evaluation is a result of runtime parse/eval stdout: stderr: dash: 5: Illegal number: foo |
dash | 37 nounset with arithmetic stdout: should not get here: x=5stderr: |
mksh | 37 nounset with arithmetic stdout: should not get here: x=5stderr: |
zsh | 37 nounset with arithmetic stdout: should not get here: x=5stderr: |
dash | 38 Integer Overflow stdout: -1996229794797103359stderr: |
bash | 38 Integer Overflow stdout: -1996229794797103359stderr: |
mksh | 38 Integer Overflow stdout: -15640831stderr: |
zsh | 38 Integer Overflow stdout: -1996229794797103359stderr: |
dash | 39 Invalid LValue stdout: stderr: dash: 2: Syntax error: word unexpected (expecting ")") |
bash | 39 Invalid LValue stdout: 9stderr: bash: line 2: ((: (a + 2) = 3 : attempted assignment to non-variable (error token is "= 3 ") |
mksh | 39 Invalid LValue stdout: 9stderr: mksh: <stdin>[2]: (a + 2) = 3 : = requires lvalue |
zsh | 39 Invalid LValue stdout: 9stderr: zsh: bad math expression: lvalue required |
dash | 40 Invalid LValue that looks like array stdout: status=127stderr: dash: 1: 1[2]: not found |
bash | 40 Invalid LValue that looks like array stdout: status=1stderr: bash: line 1: ((: 1[2] = 3 : syntax error: invalid arithmetic operator (error token is "[2] = 3 ") |
mksh | 40 Invalid LValue that looks like array stdout: status=2stderr: mksh: <stdin>[1]: 1[2] = 3 : unexpected '[' |
zsh | 40 Invalid LValue that looks like array stdout: status=2stderr: zsh: bad base syntax |
dash | 41 Invalid LValue: two sets of brackets stdout: status=127stderr: dash: 1: a[1][2]: not found |
bash | 41 Invalid LValue: two sets of brackets stdout: status=1stderr: bash: line 1: ((: a[1][2] = 3 : syntax error: invalid arithmetic operator (error token is "[2] = 3 ") |
mksh | 41 Invalid LValue: two sets of brackets stdout: status=2stderr: mksh: <stdin>[1]: a[1][2] = 3 : unexpected '[' |
zsh | 41 Invalid LValue: two sets of brackets stdout: status=2stderr: zsh: bad base syntax |
dash | 43 Exponentiation with ** stdout: stderr: dash: 1: arithmetic expression: expecting primary: " 3 ** 0 " |
mksh | 43 Exponentiation with ** stdout: stderr: mksh: <stdin>[1]: 3 ** 0 : unexpected '*' |
dash | 44 Exponentiation operator has buggy precedence stdout: stderr: dash: 1: arithmetic expression: expecting primary: " -3 ** 2 " |
mksh | 44 Exponentiation operator has buggy precedence stdout: stderr: mksh: <stdin>[1]: -3 ** 2 : unexpected '*' |
dash | 45 Negative exponent stdout: stderr: dash: 1: arithmetic expression: expecting primary: " 2**-1 * 5 " |
zsh | 45 Negative exponent stdout: 2.5stderr: |
dash | 46 Comment not allowed in the middle of multiline arithmetic stdout: 6stderr: dash: 6: arithmetic expression: expecting EOF: " 1 + 2 # not a comment " |
bash | 46 Comment not allowed in the middle of multiline arithmetic stdout: 6 []stderr: bash: line 8: 1 + 2 # not a comment : syntax error: invalid arithmetic operator (error token is "# not a comment ") bash: line 10: ((: a = 3 + 4 # comment : syntax error: invalid arithmetic operator (error token is "# comment ") |
osh | 46 Comment not allowed in the middle of multiline arithmetic stdout: 6stderr: 1 + 2 # not a comment ^ [ stdin ]:7: Unexpected token after arithmetic expression (Id.Word_Compound != Id.Arith_RParen) |
osh_ALT | 46 Comment not allowed in the middle of multiline arithmetic stdout: 6stderr: 1 + 2 # not a comment ^ [ stdin ]:7: Unexpected token after arithmetic expression (Id.Word_Compound != Id.Arith_RParen) |
dash | 47 Add integer to indexed array (a[0] decay) stdout: stderr: dash: 1: Syntax error: "(" unexpected |
mksh | 47 Add integer to indexed array (a[0] decay) stdout: stderr: mksh: <stdin>[1]: syntax error: '(' unexpected |
zsh | 47 Add integer to indexed array (a[0] decay) stdout: stderr: zsh: bad math expression: operator expected at `2 3' |
dash | 48 Add integer to associative array (a[0] decay) stdout: 5stderr: dash: 1: typeset: not found dash: 2: assoc[0]=42: not found |
dash | 49 Double subscript stdout: stderr: dash: 1: Syntax error: "(" unexpected |
zsh | 49 Double subscript stdout: 1stderr: zsh: bad base syntax |
osh | 49 Double subscript stdout: 2stderr: echo $(( a[1][1] )) ^ [ stdin ]:3: The [ operator doesn't apply to this expression |
osh_ALT | 49 Double subscript stdout: 2stderr: echo $(( a[1][1] )) ^ [ stdin ]:3: The [ operator doesn't apply to this expression |
dash | 50 result of ArithSub -- array[0] decay stdout: stderr: dash: 1: Syntax error: "(" unexpected |
zsh | 50 result of ArithSub -- array[0] decay stdout: declaredstderr: zsh: bad math expression: operator expected at `5 6' |
dash | 51 result of ArithSub -- assoc[0] decay stdout: stderr: dash: 1: Syntax error: "(" unexpected |
mksh | 51 result of ArithSub -- assoc[0] decay stdout: stderr: mksh: <stdin>[1]: syntax error: '(' unexpected |
dash | 52 comma operator stdout: stderr: dash: 1: Syntax error: "(" unexpected |
zsh | 52 comma operator stdout: stderr: zsh: bad math expression: operator expected at `5 6' |
dash | 54 array assignment with dynamic array name stdout: stderr: dash: 2: arithmetic expression: expecting EOF: " xbar[5] = 42 " |
zsh | 54 array assignment with dynamic array name stdout: 42 xbar[5]=stderr: |
dash | 55 unary assignment with dynamic var name stdout: stderr: dash: 3: arithmetic expression: expecting primary: " xbar++ " |
dash | 56 unary array assignment with dynamic var name stdout: stderr: dash: 2: xbar[5]=42: not found dash: 3: arithmetic expression: expecting EOF: " xbar[5]++ " |
zsh | 56 unary array assignment with dynamic var name stdout: 0 xbar[5]=42stderr: |
dash | 57 Dynamic parsing of arithmetic stdout: stderr: dash: 2: Illegal number: 1+2 |
mksh | 57 Dynamic parsing of arithmetic stdout: 6 true status=0stderr: |
zsh | 60 1 ? a=1 : b=2 ( bug fix) stdout: stderr: zsh: bad math expression: ':' expected |
dash | 61 Invalid constant stdout: 0 status=0 status=2stderr: dash: 1: arithmetic expression: expecting EOF: "a + 42x" dash: 7: arithmetic expression: expecting EOF: "a + 42x" |
bash | 61 Invalid constant stdout: 0 status=0 status=1 status=1stderr: bash: a + 42x: value too great for base (error token is "42x") bash: line 7: a + 42x: value too great for base (error token is "42x") |