Results for arith.test.sh

statusbashmkshkshtoyshsushbrushosh
pass 62515239595870
ok 7500003
N-I 2800000
BUG 2900000
FAIL 00213314150
TIME 0001000
total73737373737373
casebashmkshkshtoyshsushbrushoshdescription
0pass pass pass FAIL pass pass pass Side Effect in Array Indexing
details
1pass pass pass pass pass pass pass Add one to var
2pass pass pass pass pass pass pass $ is optional
3pass pass pass pass pass pass pass SimpleVarSub within arith
4pass pass pass pass pass pass pass BracedVarSub within ArithSub
5pass pass pass pass pass pass pass Arith word part
6pass pass pass pass pass pass pass Arith sub with word parts
7N-I pass pass pass FAIL pass pass Constant with quotes like '1'
detailsdetails
8pass pass pass pass pass pass pass Arith sub within arith sub
9pass pass pass pass pass pass pass Backticks within arith sub
10ok ok pass pass pass pass ok Invalid string to int
detailsdetailsdetails
11N-I N-I FAIL FAIL FAIL FAIL pass Invalid string to int with strict_arith
detailsdetailsdetailsdetailsdetailsdetails
12pass BUG FAIL pass pass pass pass Integer constant parsing
detailsdetails
13pass BUG FAIL FAIL pass pass pass Integer constant validation
detailsdetailsdetails
14pass pass pass pass pass pass pass Newline in the middle of expression
15pass pass pass pass pass pass pass Ternary operator
16pass pass pass pass pass pass pass Preincrement
17pass pass pass pass pass pass pass Postincrement
18pass pass pass pass pass pass pass Increment undefined variables
19pass pass pass FAIL pass pass pass Increment and decrement array elements
details
20pass BUG FAIL FAIL FAIL FAIL pass Increment undefined variables with nounset
detailsdetailsdetailsdetailsdetails
21pass pass pass pass pass pass pass Comma operator (borrowed from C)
22pass pass pass pass pass pass pass Augmented assignment
23pass pass pass pass pass pass pass Comparison Ops
24pass pass pass pass pass pass pass Logical Ops
25pass pass pass FAIL pass pass pass Logical Ops Short Circuit
details
26pass pass pass pass pass pass pass Bitwise ops
27pass pass pass pass pass pass pass Unary minus and plus
28ok ok FAIL FAIL FAIL FAIL pass No floating point
detailsdetailsdetailsdetailsdetailsdetails
29pass pass pass FAIL pass pass pass Array indexing in arith
details
30pass pass pass pass pass pass pass Constants in base 36
31pass N-I FAIL FAIL pass FAIL pass Constants in bases 2 to 64
detailsdetailsdetailsdetails
32pass pass pass pass pass pass pass Multiple digit constants with base N
33pass pass pass pass pass pass pass Dynamic base constants
34pass N-I FAIL pass pass pass pass Octal constant
detailsdetails
35pass N-I FAIL pass pass pass pass Dynamic octal constant
detailsdetails
36pass pass pass pass pass pass pass Dynamic hex constants
37pass pass pass pass pass pass pass Dynamic var names - result of runtime parse/eval
38pass pass pass pass pass pass pass Recursive name evaluation is a result of runtime parse/eval
39pass BUG FAIL FAIL FAIL FAIL pass nounset with arithmetic
detailsdetailsdetailsdetailsdetails
40pass BUG FAIL pass pass pass pass 64-bit integer doesn't overflow
detailsdetails
41pass BUG FAIL FAIL pass pass pass More 64-bit ops
detailsdetailsdetails
42ok ok FAIL FAIL FAIL FAIL pass Invalid LValue
detailsdetailsdetailsdetailsdetailsdetails
43ok ok FAIL FAIL FAIL FAIL pass Invalid LValue that looks like array
detailsdetailsdetailsdetailsdetailsdetails
44ok ok FAIL FAIL FAIL FAIL pass Invalid LValue: two sets of brackets
detailsdetailsdetailsdetailsdetailsdetails
45pass pass pass pass pass pass pass Operator Precedence
46pass N-I FAIL pass pass pass pass Exponentiation with **
detailsdetails
47pass N-I FAIL pass pass pass pass Exponentiation operator has buggy precedence
detailsdetails
48pass pass pass TIME pass pass pass Negative exponent
49ok pass pass FAIL FAIL FAIL ok Comment not allowed in the middle of multiline arithmetic
detailsdetailsdetailsdetailsdetails
50pass N-I FAIL FAIL pass pass pass Add integer to indexed array (a[0] decay)
detailsdetailsdetails
51pass pass pass FAIL pass pass pass Add integer to associative array (a[0] decay)
details
52pass pass pass FAIL pass pass ok Double subscript
detailsdetails
53pass pass pass FAIL pass pass pass result of ArithSub -- array[0] decay
details
54pass N-I FAIL FAIL pass pass pass result of ArithSub -- assoc[0] decay
detailsdetailsdetails
55pass pass pass FAIL pass pass pass comma operator
details
56pass pass pass FAIL pass pass pass assignment with dynamic var name
details
57pass pass pass FAIL pass pass pass array assignment with dynamic array name
details
58pass pass pass pass pass pass pass unary assignment with dynamic var name
59pass pass pass FAIL pass pass pass unary array assignment with dynamic var name
details
60pass BUG FAIL FAIL pass FAIL pass Dynamic parsing of arithmetic
detailsdetailsdetailsdetails
61pass pass pass pass pass FAIL pass Dynamic parsing on empty string
details
62pass pass pass pass FAIL pass pass nested ternary (bug fix)
details
63pass pass pass FAIL pass pass pass 1 ? a=1 : b=2 ( bug fix)
details
64BUG pass pass FAIL FAIL FAIL pass Invalid constant
detailsdetailsdetailsdetails
65pass pass pass pass pass pass pass Negative numbers with integer division /
66pass pass pass pass pass pass pass Negative numbers with %
67ok BUG FAIL FAIL FAIL FAIL pass Negative numbers with bit shift
detailsdetailsdetailsdetailsdetailsdetails
68pass pass pass FAIL pass pass pass undef[0]
details
69pass BUG FAIL FAIL FAIL FAIL pass undef[0] with nounset
detailsdetailsdetailsdetailsdetails
70pass pass pass FAIL pass pass pass s[0] with string abc
details
71pass pass pass FAIL pass pass pass s[0] with string 42
details
72BUG pass pass FAIL FAIL FAIL pass s[0] with string '12 34'
detailsdetailsdetailsdetails
391 passed, 15 OK, 10 not implemented, 11 BUG, 83 failed, 1 timeouts, 0 cases skipped

Details on runs that didn't PASS

toysh0 Side Effect in Array Indexing

[toysh stdout] Expected '6 b=2\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: 4
bash7 Constant with quotes like '1'

stdout:
stderr: 
bash: line 1: '1' + 2: syntax error: operand expected (error token is "'1' + 2")
sush7 Constant with quotes like '1'

[sush status] Expected 0, got 1

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: '1' + 2: syntax error: operand expected (error token is "'1'")
bash10 Invalid string to int

stdout:
5
stderr:
bash: line 1: shopt: strict_arith: invalid shell option name
mksh10 Invalid string to int

stdout:
5
stderr:
mksh: <stdin>[1]: shopt: not found
osh10 Invalid string to int

stdout:
5
stderr:
bash11 Invalid string to int with strict_arith

stdout:
foo
5
should not get here
stderr:
bash: line 1: shopt: strict_arith: invalid shell option name
mksh11 Invalid string to int with strict_arith

stdout:
foo
5
should not get here
stderr:
mksh: <stdin>[1]: shopt: not found
ksh11 Invalid string to int with strict_arith

[ksh stdout] Expected 'foo\n', got 'foo\n5\nshould not get here\n'
[ksh status] Expected 1, got 0

stdout:
foo
5
should not get here
stderr:
E: ksh: <stdin>[1]: shopt: inaccessible or not found
toysh11 Invalid string to int with strict_arith

[toysh stdout] Expected 'foo\n', got 'foo\n5\nshould not get here\n'
[toysh status] Expected 1, got 0

stdout:
foo
5
should not get here
stderr:
sh: shopt: No such file or directory
sush11 Invalid string to int with strict_arith

[sush stdout] Expected 'foo\n', got 'foo\n5\nshould not get here\n'
[sush status] Expected 1, got 0

stdout:
foo
5
should not get here
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: shopt: strict_arith: not supported yet
brush11 Invalid string to int with strict_arith

[brush stdout] Expected 'foo\n', got 'foo\n5\nshould not get here\n'
[brush status] Expected 1, got 0

stdout:
foo
5
should not get here
stderr:
shopt: strict_arith: invalid shell option name
mksh12 Integer constant parsing

stdout:
298
10
777
10
6151
stderr:
ksh12 Integer constant parsing

[ksh stdout] Expected '298\n10\n511\n8\n6151\n', got '298\n10\n777\n10\n6151\n'

stdout:
298
10
777
10
6151
stderr:
mksh13 Integer constant validation

stdout:
status=1
9
status=0
status=1
6
status=0
stderr:
mksh: shopt: not found
mksh:  0x1X : bad number '0x1X'
mksh: shopt: not found
mksh: shopt: not found
mksh:  2#A : bad number '2#A'
mksh: shopt: not found
ksh13 Integer constant validation

[ksh stdout] Expected 'status=1\nstatus=1\nstatus=1\nstatus=1\n', got 'status=1\n9\nstatus=0\nstatus=1\n6\nstatus=0\n'

stdout:
status=1
9
status=0
status=1
6
status=0
stderr:
E: ksh: shopt: inaccessible or not found
W: ksh:  0x1X : bad number '0x1X': Invalid argument
E: ksh: shopt: inaccessible or not found
E: ksh: shopt: inaccessible or not found
W: ksh:  2#A : bad number '2#A': Invalid argument
E: ksh: shopt: inaccessible or not found
toysh13 Integer constant validation

[toysh stdout] Expected 'status=1\nstatus=1\nstatus=1\nstatus=1\n', got 'status=1\nstatus=1\nstatus=1\n6\nstatus=0\n'

stdout:
status=1
status=1
status=1
6
status=0
stderr:
sh: shopt: No such file or directory
-c: line 1: sh: bad math:  0x1X  @ 5
sh: shopt: No such file or directory
-c: line 1: sh: bad math:  09  @ 3
sh: shopt: No such file or directory
-c: line 1: sh: bad math:  2#A  @ 4
sh: shopt: No such file or directory
toysh19 Increment and decrement array elements

[toysh stdout] Expected '6 7 6 7 - 1 1 -1 -1\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
sh: shopt: No such file or directory
main: line 2: sh: syntax error: 5
mksh20 Increment undefined variables with nounset

stdout:
[1][1]
stderr:
ksh20 Increment undefined variables with nounset

[ksh stdout] Expected u'', got '[1][1]\n'
[ksh status] Expected 1, got 0

stdout:
[1][1]
stderr:
toysh20 Increment undefined variables with nounset

[toysh stdout] Expected u'', got '[1][1]\n'
[toysh status] Expected 1, got 0

stdout:
[1][1]
stderr:
set: bad -o nounset
sush20 Increment undefined variables with nounset

[sush stdout] Expected u'', got '[1][1]\n'
[sush status] Expected 1, got 0

stdout:
[1][1]
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: nounset: invalid option name
brush20 Increment undefined variables with nounset

[brush stdout] Expected u'', got '[1][1]\n'
[brush status] Expected 1, got 0

stdout:
[1][1]
stderr:
toysh25 Logical Ops Short Circuit

[toysh stdout] Expected '11\n33\n33\n55\n', got '11\n11\n11\n11\n'

stdout:
11
11
11
11
stderr:
bash28 No floating point

stdout:
stderr: 
bash: line 1: 1 + 2.3: syntax error: invalid arithmetic operator (error token is ".3")
mksh28 No floating point

stdout:
stderr: 
mksh: <stdin>[1]: 1 + 2.3: unexpected '.'
ksh28 No floating point

[ksh status] Expected 2, got 1

stdout:
stderr: 
W: ksh: <stdin>[1]: 1 + 2.3: unexpected '.'
toysh28 No floating point

[toysh status] Expected 2, got 1

stdout:
stderr: 
main: line 1: sh: bad math: 1 + 2.3 @ 6
sush28 No floating point

[sush status] Expected 2, got 0

stdout:
3.3
stderr:
brush28 No floating point

[brush status] Expected 2, got 1

stdout:
stderr: 
ERROR error: arithmetic evaluation error: failed to parse expression: '1 + 2.3'
toysh29 Array indexing in arith

[toysh stdout] Expected '11\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: 1
mksh31 Constants in bases 2 to 64

stdout:
stderr: 
mksh: <stdin>[1]: 64#a: bad number '64#a'
ksh31 Constants in bases 2 to 64

[ksh stdout] Expected '10-35, 36-61, 62, 63\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
W: ksh: <stdin>[1]: 64#a: bad number: Invalid argument
toysh31 Constants in bases 2 to 64

[toysh stdout] Expected '10-35, 36-61, 62, 63\n', got ''
[toysh status] Expected 0, got 1

stdout:
stderr: 
main: line 1: sh: bad math: 64#a @ 4
brush31 Constants in bases 2 to 64

[brush stdout] Expected '10-35, 36-61, 62, 63\n', got ''
[brush status] Expected 0, got 1

stdout:
stderr: 
ERROR error: arithmetic evaluation error: failed to parse expression: '64#a'
mksh34 Octal constant

stdout:
11
stderr:
ksh34 Octal constant

[ksh stdout] Expected '9\n', got '11\n'

stdout:
11
stderr:
mksh35 Dynamic octal constant

stdout:
11
stderr:
ksh35 Dynamic octal constant

[ksh stdout] Expected '9\n', got '11\n'

stdout:
11
stderr:
mksh39 nounset with arithmetic

stdout:
should not get here: x=5
stderr:
ksh39 nounset with arithmetic

[ksh stdout] Expected u'', got 'should not get here: x=5\n'
[ksh status] Expected 1, got 0

stdout:
should not get here: x=5
stderr:
toysh39 nounset with arithmetic

[toysh stdout] Expected u'', got 'should not get here: x=5\n'
[toysh status] Expected 1, got 0

stdout:
should not get here: x=5
stderr:
set: bad -o nounset
sush39 nounset with arithmetic

[sush stdout] Expected u'', got 'should not get here: x=5\n'
[sush status] Expected 1, got 0

stdout:
should not get here: x=5
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: nounset: invalid option name
brush39 nounset with arithmetic

[brush stdout] Expected u'', got 'should not get here: x=5\n'
[brush status] Expected 1, got 0

stdout:
should not get here: x=5
stderr:
mksh40 64-bit integer doesn't overflow

stdout:
-2147483648
0
-2147483648
max positive = 2147483647
stderr:
ksh40 64-bit integer doesn't overflow

[ksh stdout] Expected '2147483648\n4294967296\n6442450944\nmax positive = 9223372036854775807\n' Got '-2147483648\n0\n-2147483648\nmax positive = 2147483647\n'

stdout:
-2147483648
0
-2147483648
max positive = 2147483647
stderr:
mksh41 More 64-bit ops

stdout:
eq=1
eq=0
greater=1
greater=1
ge=1
ge=0
le=0
le=0
stderr:
ksh41 More 64-bit ops

[ksh stdout] Expected 'eq=1\neq=0\ngreater=0\ngreater=0\nge=0\nge=0\nle=1\nle=0\n' Got 'eq=1\neq=0\ngreater=1\ngreater=1\nge=1\nge=0\nle=0\nle=0\n'

stdout:
eq=1
eq=0
greater=1
greater=1
ge=1
ge=0
le=0
le=0
stderr:
toysh41 More 64-bit ops

[toysh stdout] Expected 'eq=1\neq=0\ngreater=0\ngreater=0\nge=0\nge=0\nle=1\nle=0\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
bash42 Invalid LValue

stdout:
9
stderr:
bash: line 2: ((: (a + 2) = 3 : attempted assignment to non-variable (error token is "= 3 ")
mksh42 Invalid LValue

stdout:
9
stderr:
mksh: <stdin>[2]:  (a + 2) = 3 : = requires lvalue
ksh42 Invalid LValue

[ksh stdout] Expected u'', got '9\n'
[ksh status] Expected 2, got 0

stdout:
9
stderr:
W: ksh: <stdin>[2]:  (a + 2) = 3 : = requires lvalue
toysh42 Invalid LValue

[toysh stdout] Expected u'', got '9\n'
[toysh status] Expected 2, got 0

stdout:
9
stderr:
main: line 2: sh: bad math:  (a + 2) = 3  @ 9
sush42 Invalid LValue

[sush stdout] Expected u'', got '9\n'
[sush status] Expected 2, got 0

stdout:
9
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: ((: (a + 2) = 3 : attempted assignment to non-variable (error token is "=3")
brush42 Invalid LValue

[brush stdout] Expected u'', got '9\n'
[brush status] Expected 2, got 0

stdout:
9
stderr:
ERROR error: arithmetic evaluation error: failed to parse expression: '(a + 2)= 3'
bash43 Invalid LValue that looks like array

stdout:
status=1
stderr:
bash: line 1: ((: 1[2] = 3 : syntax error: invalid arithmetic operator (error token is "[2] = 3 ")
mksh43 Invalid LValue that looks like array

stdout:
status=2
stderr:
mksh: <stdin>[1]:  1[2] = 3 : unexpected '['
ksh43 Invalid LValue that looks like array

[ksh stdout] Expected u'', got 'status=2\n'
[ksh status] Expected 1, got 0

stdout:
status=2
stderr:
W: ksh: <stdin>[1]:  1[2] = 3 : unexpected '['
toysh43 Invalid LValue that looks like array

[toysh stdout] Expected u'', got 'status=1\n'
[toysh status] Expected 1, got 0

stdout:
status=1
stderr:
main: line 1: sh: bad math:  1[2] = 3  @ 2
sush43 Invalid LValue that looks like array

[sush stdout] Expected u'', got 'status=1\n'
[sush status] Expected 1, got 0

stdout:
status=1
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: ((: 1[2] = 3 : syntax error in expression (error token is "[2")
brush43 Invalid LValue that looks like array

[brush stdout] Expected u'', got 'status=1\n'
[brush status] Expected 1, got 0

stdout:
status=1
stderr:
ERROR error: arithmetic evaluation error: failed to parse expression: '1[2] = 3'
bash44 Invalid LValue: two sets of brackets

stdout:
status=1
stderr:
bash: line 1: ((: a[1][2] = 3 : syntax error: invalid arithmetic operator (error token is "[2] = 3 ")
mksh44 Invalid LValue: two sets of brackets

stdout:
status=2
stderr:
mksh: <stdin>[1]:  a[1][2] = 3 : unexpected '['
ksh44 Invalid LValue: two sets of brackets

[ksh stdout] Expected u'', got 'status=2\n'
[ksh status] Expected 2, got 0

stdout:
status=2
stderr:
W: ksh: <stdin>[1]:  a[1][2] = 3 : unexpected '['
toysh44 Invalid LValue: two sets of brackets

[toysh stdout] Expected u'', got 'status=1\n'
[toysh status] Expected 2, got 0

stdout:
status=1
stderr:
main: line 1: sh: bad math:  a[1][2] = 3  @ 2
sush44 Invalid LValue: two sets of brackets

[sush stdout] Expected u'', got 'status=1\n'
[sush status] Expected 2, got 0

stdout:
status=1
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: ((: a[1][2] = 3 : syntax error in expression (error token is "[2")
brush44 Invalid LValue: two sets of brackets

[brush stdout] Expected u'', got 'status=1\n'
[brush status] Expected 2, got 0

stdout:
status=1
stderr:
ERROR error: arithmetic evaluation error: failed to parse expression: 'a[1][2] = 3'
mksh46 Exponentiation with **

stdout:
stderr: 
mksh: <stdin>[1]:  3 ** 0 : unexpected '*'
ksh46 Exponentiation with **

[ksh stdout] Expected '1\n3\n9\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
W: ksh: <stdin>[1]:  3 ** 0 : unexpected '*'
mksh47 Exponentiation operator has buggy precedence

stdout:
stderr: 
mksh: <stdin>[1]:  -3 ** 2 : unexpected '*'
ksh47 Exponentiation operator has buggy precedence

[ksh stdout] Expected '9\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
W: ksh: <stdin>[1]:  -3 ** 2 : unexpected '*'
bash49 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
")
toysh49 Comment not allowed in the middle of multiline arithmetic

[toysh stdout] Expected '6\n', got '6\n[0]\n'
[toysh status] Expected 1, got 0

stdout:
6
[0]
stderr:
main: line 6: sh: bad math: 
1 + 2  # not a comment
 @ 9
main: line 9: sh: bad math:  a = 3 + 4  # comment
 @ 12
sush49 Comment not allowed in the middle of multiline arithmetic

[sush stdout] Expected '6\n', got '6\n[]\n'
[sush status] Expected 1, got 0

stdout:
6
[]
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: #: invalid arithmetic base (error token is "#")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: ((: #: invalid arithmetic base (error token is "#")
brush49 Comment not allowed in the middle of multiline arithmetic

[brush stdout] Expected '6\n', got '6\n[7]\n'
[brush status] Expected 1, got 0

stdout:
6
[7]
stderr:
ERROR error: arithmetic evaluation error: failed to parse expression: '
1 + 2  # not a comment
'
osh49 Comment not allowed in the middle of multiline arithmetic

stdout:
6
stderr:
  1 + 2  # not a comment
         ^
[ stdin ]:7: Unexpected token after arithmetic expression (Id.Word_Compound != Id.Arith_RParen)
mksh50 Add integer to indexed array (a[0] decay)

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh50 Add integer to indexed array (a[0] decay)

[ksh stdout] Expected '6\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
toysh50 Add integer to indexed array (a[0] decay)

[toysh stdout] Expected '6\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: )
toysh51 Add integer to associative array (a[0] decay)

[toysh stdout] Expected '47\n', got '5\n'

stdout:
5
stderr:
sh: typeset: No such file or directory
sh: assoc[0]=42: No such file or directory
toysh52 Double subscript

[toysh stdout] Expected '2\n', got ''
[toysh status] Expected 1, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: 1
osh52 Double subscript

stdout:
2
stderr:
  echo $(( a[1][1] ))
               ^
[ stdin ]:3: The [ operator doesn't apply to this expression
toysh53 result of ArithSub -- array[0] decay

[toysh stdout] Expected 'declared\n4\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: 4
mksh54 result of ArithSub -- assoc[0] decay

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh54 result of ArithSub -- assoc[0] decay

[ksh stdout] Expected 'declared\n0\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
toysh54 result of ArithSub -- assoc[0] decay

[toysh stdout] Expected 'declared\n0\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: )
toysh55 comma operator

[toysh stdout] Expected '42\nlast=6\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: 4
toysh56 assignment with dynamic var name

[toysh stdout] Expected '42\nxbar=42\n', got '0\nxbar=0\n'

stdout:
0
xbar=0
stderr:
toysh57 array assignment with dynamic array name

[toysh stdout] Expected '42\nxbar[5]=42\n', got 'xbar[5]=\n'

stdout:
xbar[5]=
stderr:
main: line 2: sh: bad math:  xbar[5] = 42  @ 6
toysh59 unary array assignment with dynamic var name

[toysh stdout] Expected '42\nxbar[5]=43\n', got 'xbar[5]=\n'

stdout:
xbar[5]=
stderr:
sh: xbar[5]=42: No such file or directory
main: line 3: sh: bad math:  xbar[5]++  @ 6
mksh60 Dynamic parsing of arithmetic

stdout:
6
true
status=0
stderr:
ksh60 Dynamic parsing of arithmetic

[ksh stdout] Expected '6\ntrue\nstatus=2\n', got '6\ntrue\nstatus=0\n'

stdout:
6
true
status=0
stderr:
toysh60 Dynamic parsing of arithmetic

[toysh stdout] Expected '6\ntrue\nstatus=2\n', got '6\nstatus=2\n'

stdout:
6
status=2
stderr:
[[: not integer: e
[: not integer: e
brush60 Dynamic parsing of arithmetic

[brush stdout] Expected '6\ntrue\nstatus=2\n', got '6\ntrue\nstatus=1\n'

stdout:
6
true
status=1
stderr:
brush61 Dynamic parsing on empty string

[brush stdout] Expected '0\n0\n', got '0\n'
[brush status] Expected 0, got 1

stdout:
0
stderr:
ERROR error: arithmetic evaluation error: failed to parse expression: ' '
sush62 nested ternary (bug fix)

[sush stdout] Expected '3\n', got '\n'

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: 1?2?3:4:5: command not found
toysh63 1 ? a=1 : b=2 ( bug fix)

[toysh stdout] Expected '1\na=1\n', got '0\na=0\n'

stdout:
0
a=0
stderr:
bash64 Invalid constant

stdout:
0
status=0
status=1
status=1
stderr:
bash: line 1: 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")
toysh64 Invalid constant

[toysh stdout] Expected '0\nstatus=0\nstatus=1\n', got '0\nstatus=0\nstatus=1\nstatus=1\n'
[toysh status] Expected 1, got 0

stdout:
0
status=0
status=1
status=1
stderr:
-c: line 1: sh: bad math: a + 42x @ 7
main: line 7: sh: bad math: a + 42x @ 7
sush64 Invalid constant

[sush stdout] Expected '0\nstatus=0\nstatus=1\n', got '0\nstatus=0\nstatus=1\nstatus=1\n'
[sush status] Expected 1, got 0

stdout:
0
status=0
status=1
status=1
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: 42x: value too great for base (error token is "42x")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: 42x: value too great for base (error token is "42x")
brush64 Invalid constant

[brush stdout] Expected '0\nstatus=0\nstatus=1\n', got '0\nstatus=0\nstatus=1\nstatus=1\n'
[brush status] Expected 1, got 0

stdout:
0
status=0
status=1
status=1
stderr:
ERROR error: arithmetic evaluation error: failed to parse expression: 'a + 42x'
ERROR error: arithmetic evaluation error: failed to parse expression: 'a + 42x'
bash67 Negative numbers with bit shift

stdout:
10
5
-9223372036854775808
---
8
16
0
0
---
stderr:
mksh67 Negative numbers with bit shift

stdout:
10
5
-2147483648
---
8
16
0
0
---
stderr:
ksh67 Negative numbers with bit shift

[ksh stdout] Expected '10\n5\n---\n8\n16\n---\n', got '10\n5\n-2147483648\n---\n8\n16\n0\n0\n---\n'

stdout:
10
5
-2147483648
---
8
16
0
0
---
stderr:
toysh67 Negative numbers with bit shift

[toysh stdout] Expected '10\n5\n---\n8\n16\n---\n', got '10\n5\n-9223372036854775808\n---\n8\n16\n0\n0\n---\n'

stdout:
10
5
-9223372036854775808
---
8
16
0
0
---
stderr:
sush67 Negative numbers with bit shift

[sush stdout] Expected '10\n5\n---\n8\n16\n---\n', got '10\n5\n0\n---\n8\n16\n0\n0\n---\n'

stdout:
10
5
0
---
8
16
0
0
---
stderr:
brush67 Negative numbers with bit shift

[brush stdout] Expected '10\n5\n---\n8\n16\n---\n', got '10\n5\n-9223372036854775808\n---\n8\n16\n0\n0\n---\n'

stdout:
10
5
-9223372036854775808
---
8
16
0
0
---
stderr:
toysh68 undef[0]

[toysh stdout] Expected 'ARITH 0\nstatus=0\n\nstatus=1\n\nUNDEF\nstatus=0\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
mksh69 undef[0] with nounset

stdout:
UNSET 0
status=0
stderr:
ksh69 undef[0] with nounset

[ksh stdout] Expected '', got 'UNSET 0\nstatus=0\n'
[ksh status] Expected 1, got 0

stdout:
UNSET 0
status=0
stderr:
toysh69 undef[0] with nounset

[toysh status] Expected 1, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush69 undef[0] with nounset

[sush stdout] Expected '', got 'UNSET 0\nstatus=0\n'
[sush status] Expected 1, got 0

stdout:
UNSET 0
status=0
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: set: nounset: invalid option name
brush69 undef[0] with nounset

[brush stdout] Expected '', got 'UNSET 0\nstatus=0\n'
[brush status] Expected 1, got 0

stdout:
UNSET 0
status=0
stderr:
toysh70 s[0] with string abc

[toysh stdout] Expected 'abc 0 0\nstatus=0\n\nstatus=1\n\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
toysh71 s[0] with string 42

[toysh stdout] Expected '42 42 0\nstatus=0\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
bash72 s[0] with string '12 34'

stdout:
status=1
stderr:
bash: line 2: 12 34: syntax error in expression (error token is "34")
toysh72 s[0] with string '12 34'

[toysh stdout] Expected '', got 'status=1\n'
[toysh status] Expected 1, got 0

stdout:
status=1
stderr:
main: line 2: sh: bad math: s[0]  @ -9404
main: line 2: sh: bad math:  s[0]  @ 2
sush72 s[0] with string '12 34'

[sush stdout] Expected '', got 'status=1\n'
[sush status] Expected 1, got 0

stdout:
status=1
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: s[0] : syntax error in expression (error token is "34")
brush72 s[0] with string '12 34'

[brush stdout] Expected '', got 'status=1\n'
[brush status] Expected 1, got 0

stdout:
status=1
stderr:
ERROR error: arithmetic evaluation error: failed to parse expression: '12 34'