Results for arith.test.sh

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

Details on runs that didn't PASS

dash0 Side Effect in Array Indexing

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash0 Side Effect in Array Indexing

[ash stdout] Expected '6 b=2\n' Got ''
[ash status] Expected 0 Got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh0 Side Effect in Array Indexing

stdout:
5 b=2
stderr:
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")
dash7 Constant with quotes like '1'

stdout:
stderr: 
dash: 1: arithmetic expression: expecting primary: "'1' + 2"
ash7 Constant with quotes like '1'

[ash status] Expected 0 Got 2

stdout:
stderr: 
ash: arithmetic syntax error
zsh7 Constant with quotes like '1'

stdout:
stderr: 
zsh: bad math expression: illegal character: '
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
dash10 Invalid string to int

stdout:
stderr: 
dash: 1: shopt: not found
dash: 3: Illegal number: foo
zsh10 Invalid string to int

stdout:
5
stderr:
zsh: command not found: shopt
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
dash11 Invalid string to int with strict_arith

stdout:
foo
stderr:
dash: 1: shopt: not found
dash: 4: Illegal number: foo
ash11 Invalid string to int with strict_arith

[ash stdout] Expected 'foo\n' Got 'foo\n5\nshould not get here\n'
[ash status] Expected 1 Got 0

stdout:
foo
5
should not get here
stderr:
ash: shopt: not found
zsh11 Invalid string to int with strict_arith

stdout:
foo
5
should not get here
stderr:
zsh: command not found: shopt
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
dash12 Integer constant parsing

stdout:
298
10
511
8
stderr:
dash: 5: arithmetic expression: expecting EOF: " 24#ag7 "
zsh12 Integer constant parsing

stdout:
298
10
777
10
6151
stderr:
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:
dash13 Integer constant validation

stdout:
status=2
status=2
status=2
status=2
stderr:
dash: 1: shopt: not found
dash: 1: arithmetic expression: expecting EOF: " 0x1X "
dash: 1: shopt: not found
dash: 1: arithmetic expression: expecting EOF: " 09 "
dash: 1: shopt: not found
dash: 1: arithmetic expression: expecting EOF: " 2#A "
dash: 1: shopt: not found
dash: 1: arithmetic expression: expecting EOF: " 02#0110 "
ash13 Integer constant validation

[ash stdout] Expected 'status=1\nstatus=1\nstatus=1\nstatus=1\n' Got 'status=2\nstatus=2\nstatus=2\nstatus=2\n'

stdout:
status=2
status=2
status=2
status=2
stderr:
ash: shopt: not found
ash: arithmetic syntax error
ash: shopt: not found
ash: arithmetic syntax error
ash: shopt: not found
ash: arithmetic syntax error
ash: shopt: not found
ash: arithmetic syntax error
zsh13 Integer constant validation

stdout:
status=1
9
status=0
status=1
6
status=0
stderr:
zsh:1: command not found: shopt
zsh:1: bad math expression: operator expected at `X '
zsh:1: command not found: shopt
zsh:1: command not found: shopt
zsh:1: bad math expression: operator expected at `A '
zsh:1: command not found: shopt
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
dash16 Preincrement

stdout:
4
4
stderr:
dash17 Postincrement

stdout:
stderr: 
dash: 2: arithmetic expression: expecting primary: "a++"
dash18 Increment undefined variables

stdout:
[][]
stderr:
dash: 1: shopt: not found
dash: 2: undef1++: not found
dash: 3: ++undef2: not found
ash18 Increment undefined variables

[ash stdout] Expected '[1][1]\n' Got '[][]\n'

stdout:
[][]
stderr:
ash: shopt: not found
ash: undef1++: not found
ash: ++undef2: not found
dash19 Increment and decrement array elements

stdout:
stderr: 
dash: 1: shopt: not found
dash: 2: Syntax error: "(" unexpected
ash19 Increment and decrement array elements

[ash stdout] Expected '6 7 6 7 - 1 1 -1 -1\n' Got ''
[ash status] Expected 0 Got 2

stdout:
stderr: 
ash: shopt: not found
ash: syntax error: unexpected "("
zsh19 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
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
dash20 Increment undefined variables with nounset

stdout:
stderr: 
dash: 2: undef1++: not found
dash: 3: ++undef2: not found
dash: 4: undef1: parameter not set
ash20 Increment undefined variables with nounset

[ash status] Expected 1 Got 2

stdout:
stderr: 
ash: undef1++: not found
ash: ++undef2: not found
ash: undef1: parameter not set
zsh20 Increment undefined variables with nounset

stdout:
[1][1]
stderr:
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:
dash21 Comma operator (borrowed from C)

stdout:
stderr: 
dash: 3: arithmetic expression: expecting EOF: "a,(b+1)"
dash25 Logical Ops Short Circuit

stdout:
11
11
11
11
stderr:
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
ash25 Logical Ops Short Circuit

[ash stdout] Expected '11\n33\n33\n55\n' Got '11\n11\n11\n11\n'

stdout:
11
11
11
11
stderr:
ash: 1: not found
ash: x: not found
ash: 0: not found
ash: x: not found
ash: 0: not found
ash: 1: not found
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")
zsh28 No floating point

stdout:
3.2999999999999998
stderr:
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: arithmetic evaluation error: failed to parse expression: '1 + 2.3'
dash29 Array indexing in arith

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash29 Array indexing in arith

[ash stdout] Expected '11\n' Got ''
[ash status] Expected 0 Got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh29 Array indexing in arith

stdout:
7
stderr:
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
dash30 Constants in base 36

stdout:
stderr: 
dash: 1: arithmetic expression: expecting EOF: "36#a"
dash31 Constants in bases 2 to 64

stdout:
stderr: 
dash: 1: arithmetic expression: expecting EOF: "64#a"
zsh31 Constants in bases 2 to 64

stdout:
stderr: 
zsh: invalid base (must be 2 to 36 inclusive): 64
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: arithmetic evaluation error: failed to parse expression: '64#a'
dash32 Multiple digit constants with base N

stdout:
stderr: 
dash: 1: arithmetic expression: expecting EOF: "10#0123"
dash33 Dynamic base constants

stdout:
stderr: 
dash: 2: arithmetic expression: expecting EOF: " 16#a "
zsh34 Octal constant

stdout:
11
stderr:
mksh34 Octal constant

stdout:
11
stderr:
ksh34 Octal constant

[ksh stdout] Expected '9\n' Got '11\n'

stdout:
11
stderr:
zsh35 Dynamic octal constant

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:
dash39 Recursive name evaluation is a result of runtime parse/eval

stdout:
stderr: 
dash: 5: Illegal number: foo
dash40 nounset with arithmetic

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

[ash stdout] Expected u'' Got 'should not get here: x=5\n'
[ash status] Expected 1 Got 0

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

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

stdout:
should not get here: x=5
stderr:
ksh40 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:
toysh40 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
sush40 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
brush40 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:
mksh41 64-bit integer doesn't overflow

stdout:
-2147483648
0
-2147483648
max positive = 2147483647
stderr:
ksh41 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:
dash42 More 64-bit ops

stdout:
stderr: 
mksh42 More 64-bit ops

stdout:
eq=1
eq=0
greater=1
greater=1
ge=1
ge=0
le=0
le=0
stderr:
ksh42 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:
toysh42 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
bash43 Invalid LValue

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

stdout:
stderr: 
dash: 2: Syntax error: word unexpected (expecting ")")
zsh43 Invalid LValue

stdout:
9
stderr:
zsh: bad math expression: lvalue required
mksh43 Invalid LValue

stdout:
9
stderr:
mksh: <stdin>[2]:  (a + 2) = 3 : = requires lvalue
ksh43 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
toysh43 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
sush43 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")
brush43 Invalid LValue

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

stdout:
9
stderr:
error: arithmetic evaluation error: failed to parse expression: '(a + 2)= 3'
bash44 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 ")
dash44 Invalid LValue that looks like array

stdout:
status=127
stderr:
dash: 1: 1[2]: not found
ash44 Invalid LValue that looks like array

[ash stdout] Expected u'' Got 'status=127\n'
[ash status] Expected 1 Got 0

stdout:
status=127
stderr:
ash: 1[2]: not found
zsh44 Invalid LValue that looks like array

stdout:
status=2
stderr:
zsh: bad base syntax
mksh44 Invalid LValue that looks like array

stdout:
status=2
stderr:
mksh: <stdin>[1]:  1[2] = 3 : unexpected '['
ksh44 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 '['
toysh44 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
sush44 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")
brush44 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: arithmetic evaluation error: failed to parse expression: '1[2] = 3'
bash45 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 ")
dash45 Invalid LValue: two sets of brackets

stdout:
status=127
stderr:
dash: 1: a[1][2]: not found
ash45 Invalid LValue: two sets of brackets

[ash stdout] Expected u'' Got 'status=127\n'
[ash status] Expected 2 Got 0

stdout:
status=127
stderr:
ash: a[1][2]: not found
zsh45 Invalid LValue: two sets of brackets

stdout:
status=2
stderr:
zsh: bad base syntax
mksh45 Invalid LValue: two sets of brackets

stdout:
status=2
stderr:
mksh: <stdin>[1]:  a[1][2] = 3 : unexpected '['
ksh45 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 '['
toysh45 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
sush45 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")
brush45 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: arithmetic evaluation error: failed to parse expression: 'a[1][2] = 3'
dash47 Exponentiation with **

stdout:
stderr: 
dash: 1: arithmetic expression: expecting primary: " 3 ** 0 "
mksh47 Exponentiation with **

stdout:
stderr: 
mksh: <stdin>[1]:  3 ** 0 : unexpected '*'
ksh47 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 '*'
dash48 Exponentiation operator has buggy precedence

stdout:
stderr: 
dash: 1: arithmetic expression: expecting primary: " -3 ** 2 "
mksh48 Exponentiation operator has buggy precedence

stdout:
stderr: 
mksh: <stdin>[1]:  -3 ** 2 : unexpected '*'
ksh48 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 '*'
dash49 Negative exponent

stdout:
stderr: 
dash: 1: arithmetic expression: expecting primary: " 2**-1 * 5 "
ash49 Negative exponent

[ash status] Expected 1 Got 2

stdout:
stderr: 
ash: exponent less than 0
zsh49 Negative exponent

stdout:
2.5
stderr:
bash50 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
")
dash50 Comment not allowed in the middle of multiline arithmetic

stdout:
6
stderr:
dash: 6: arithmetic expression: expecting EOF: "
1 + 2  # not a comment
"
ash50 Comment not allowed in the middle of multiline arithmetic

[ash status] Expected 1 Got 2

stdout:
6
stderr:
ash: arithmetic syntax error
toysh50 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
sush50 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 "#")
brush50 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: arithmetic evaluation error: failed to parse expression: '
1 + 2  # not a comment
'
osh50 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)
dash51 Add integer to indexed array (a[0] decay)

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash51 Add integer to indexed array (a[0] decay)

[ash stdout] Expected '6\n' Got ''
[ash status] Expected 0 Got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh51 Add integer to indexed array (a[0] decay)

stdout:
stderr: 
zsh: bad math expression: operator expected at `2 3'
mksh51 Add integer to indexed array (a[0] decay)

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh51 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 '('
toysh51 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: )
dash52 Add integer to associative array (a[0] decay)

stdout:
5
stderr:
dash: 1: typeset: not found
dash: 2: assoc[0]=42: not found
ash52 Add integer to associative array (a[0] decay)

[ash stdout] Expected '47\n' Got '5\n'

stdout:
5
stderr:
ash: typeset: not found
ash: assoc[0]=42: not found
toysh52 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
dash53 Double subscript

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash53 Double subscript

[ash stdout] Expected '2\n' Got ''
[ash status] Expected 1 Got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh53 Double subscript

stdout:
1
stderr:
zsh: bad base syntax
toysh53 Double subscript

[toysh stdout] Expected '2\n' Got ''
[toysh status] Expected 1 Got 2

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

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

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash54 result of ArithSub -- array[0] decay

[ash stdout] Expected 'declared\n4\n' Got ''
[ash status] Expected 0 Got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh54 result of ArithSub -- array[0] decay

stdout:
declared
stderr:
zsh: bad math expression: operator expected at `5 6'
toysh54 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
dash55 result of ArithSub -- assoc[0] decay

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash55 result of ArithSub -- assoc[0] decay

[ash stdout] Expected 'declared\n0\n' Got ''
[ash status] Expected 0 Got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
mksh55 result of ArithSub -- assoc[0] decay

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh55 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 '('
toysh55 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: )
dash56 comma operator

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash56 comma operator

[ash stdout] Expected '42\nlast=6\n' Got ''
[ash status] Expected 0 Got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh56 comma operator

stdout:
stderr: 
zsh: bad math expression: operator expected at `5 6'
toysh56 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
toysh57 assignment with dynamic var name

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

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

stdout:
stderr: 
dash: 2: arithmetic expression: expecting EOF: " xbar[5] = 42 "
ash58 array assignment with dynamic array name

[ash stdout] Expected '42\nxbar[5]=42\n' Got ''
[ash status] Expected 0 Got 2

stdout:
stderr: 
ash: arithmetic syntax error
zsh58 array assignment with dynamic array name

stdout:
42
xbar[5]=
stderr:
toysh58 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
dash59 unary assignment with dynamic var name

stdout:
stderr: 
dash: 3: arithmetic expression: expecting primary: " xbar++ "
dash60 unary array assignment with dynamic var name

stdout:
stderr: 
dash: 2: xbar[5]=42: not found
dash: 3: arithmetic expression: expecting EOF: " xbar[5]++ "
ash60 unary array assignment with dynamic var name

[ash stdout] Expected '42\nxbar[5]=43\n' Got ''
[ash status] Expected 0 Got 2

stdout:
stderr: 
ash: xbar[5]=42: not found
ash: arithmetic syntax error
zsh60 unary array assignment with dynamic var name

stdout:
0
xbar[5]=42
stderr:
toysh60 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
dash61 Dynamic parsing of arithmetic

stdout:
stderr: 
dash: 2: Illegal number: 1+2
ash61 Dynamic parsing of arithmetic

[ash stdout] Expected '6\ntrue\nstatus=2\n' Got '6\nstatus=2\n'

stdout:
6
status=2
stderr:
ash: e: bad number
ash: e: bad number
mksh61 Dynamic parsing of arithmetic

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

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

stdout:
6
true
status=0
stderr:
toysh61 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
brush61 Dynamic parsing of arithmetic

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

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

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

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

[ash stdout] Expected '3\n' Got ''
[ash status] Expected 0 Got 2

stdout:
stderr: 
ash: malformed ?: operator
sush63 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
ash64 1 ? a=1 : b=2 ( bug fix)

[ash stdout] Expected '1\na=1\n' Got ''
[ash status] Expected 0 Got 2

stdout:
stderr: 
ash: malformed ?: operator
zsh64 1 ? a=1 : b=2 ( bug fix)

stdout:
stderr: 
zsh: bad math expression: ':' expected
toysh64 1 ? a=1 : b=2 ( bug fix)

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

stdout:
0
a=0
stderr:
bash65 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")
dash65 Invalid constant

stdout:
0
status=0
status=2
stderr:
dash: 1: arithmetic expression: expecting EOF: "a + 42x"
dash: 7: arithmetic expression: expecting EOF: "a + 42x"
ash65 Invalid constant

[ash stdout] Expected '0\nstatus=0\nstatus=1\n' Got '0\nstatus=0\nstatus=2\n'
[ash status] Expected 1 Got 2

stdout:
0
status=0
status=2
stderr:
ash: arithmetic syntax error
ash: arithmetic syntax error
toysh65 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
sush65 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")
brush65 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: arithmetic evaluation error: failed to parse expression: 'a + 42x'
error: arithmetic evaluation error: failed to parse expression: 'a + 42x'
bash68 Negative numbers with bit shift

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

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

[ash 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:
zsh68 Negative numbers with bit shift

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

stdout:
10
5
-2147483648
---
8
16
0
0
---
stderr:
ksh68 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:
toysh68 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:
sush68 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:
brush68 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:
dash69 undef[0]

stdout:
stderr: 
ash69 undef[0]

[ash stdout] Expected 'ARITH 0\nstatus=0\n\nstatus=1\n\nUNDEF\nstatus=0\n' Got ''
[ash status] Expected 0 Got 2

stdout:
stderr: 
ash: arithmetic syntax error
toysh69 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
dash70 undef[0] with nounset

stdout:
stderr: 
ash70 undef[0] with nounset

[ash status] Expected 1 Got 2

stdout:
stderr: 
ash: arithmetic syntax error
zsh70 undef[0] with nounset

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

stdout:
UNSET 0
status=0
stderr:
ksh70 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:
toysh70 undef[0] with nounset

[toysh status] Expected 1 Got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush70 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
brush70 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:
dash71 s[0] with string abc

stdout:
stderr: 
ash71 s[0] with string abc

[ash stdout] Expected 'abc 0 0\nstatus=0\n\nstatus=1\n\n' Got ''
[ash status] Expected 0 Got 2

stdout:
stderr: 
ash: arithmetic syntax error
toysh71 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
dash72 s[0] with string 42

stdout:
stderr: 
ash72 s[0] with string 42

[ash stdout] Expected '42 42 0\nstatus=0\n' Got ''
[ash status] Expected 0 Got 2

stdout:
stderr: 
ash: arithmetic syntax error
zsh72 s[0] with string 42

stdout:
42 0 4
status=0
stderr:
toysh72 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
bash73 s[0] with string '12 34'

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

stdout:
stderr: 
dash: 2: Illegal number: 12 34
ash73 s[0] with string '12 34'

[ash status] Expected 1 Got 2

stdout:
stderr: 
ash: arithmetic syntax error
zsh73 s[0] with string '12 34'

stdout:
12 34 0 1
status=0
stderr:
toysh73 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]  @ -9324
main: line 2: sh: bad math:  s[0]  @ 2
sush73 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")
brush73 s[0] with string '12 34'

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

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