Results for array.test.sh

statusbashdashashzshmkshkshtoyshsushbrushosh
pass 63772541458464776
ok 11001700000
N-I 31002400000
BUG 1000600000
FAIL 07071520336632312
TIME 0000004000
total78787878787878787878
casebashdashashzshmkshkshtoyshsushbrushoshdescription
0pass FAIL FAIL pass BUG FAIL FAIL pass pass pass nounset / set -u with empty array (bug in bash 4.3, fixed in 4.4)
detailsdetailsdetailsdetailsdetails
1pass FAIL FAIL FAIL BUG FAIL FAIL pass pass pass local array
detailsdetailsdetailsdetailsdetailsdetails
2pass FAIL FAIL pass pass pass FAIL pass pass pass Command with with word splitting in array
detailsdetailsdetails
3pass pass pass FAIL ok FAIL pass FAIL FAIL pass space before ( in array initialization
detailsdetailsdetailsdetailsdetails
4pass FAIL FAIL pass pass pass FAIL pass pass pass array over multiple lines
detailsdetailsdetails
5pass pass pass FAIL ok FAIL pass FAIL FAIL pass array with invalid token
detailsdetailsdetailsdetailsdetails
6pass FAIL FAIL pass pass pass FAIL FAIL pass pass array with empty string
detailsdetailsdetailsdetails
7pass FAIL FAIL FAIL pass pass FAIL pass pass pass Retrieve index
detailsdetailsdetailsdetails
8pass FAIL FAIL pass pass pass FAIL pass pass pass Retrieve out of bounds index
detailsdetailsdetails
9pass FAIL FAIL pass N-I FAIL FAIL FAIL pass pass Negative index
detailsdetailsdetailsdetailsdetailsdetails
10pass FAIL FAIL FAIL BUG FAIL FAIL FAIL FAIL pass Negative index and sparse array
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
11pass FAIL FAIL FAIL BUG FAIL FAIL FAIL FAIL pass Negative index and sparse array
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
12pass FAIL FAIL FAIL BUG FAIL FAIL FAIL FAIL pass Length after unset
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
13pass FAIL FAIL FAIL pass pass FAIL pass pass pass Retrieve index that is a variable
detailsdetailsdetailsdetails
14pass FAIL FAIL FAIL pass pass FAIL pass pass pass Retrieve index that is a variable without $
detailsdetailsdetailsdetails
15pass FAIL FAIL FAIL pass pass FAIL pass pass pass Retrieve index that is a command sub
detailsdetailsdetailsdetails
16pass FAIL FAIL FAIL pass pass FAIL pass pass pass Retrieve array indices with ${!a}
detailsdetailsdetailsdetails
17pass FAIL FAIL FAIL pass pass TIME pass pass pass Retrieve sparse array indices with ${!a}
detailsdetailsdetailsdetails
18pass FAIL FAIL FAIL N-I FAIL FAIL pass pass pass ${!a[1]} is named ref in bash
detailsdetailsdetailsdetailsdetailsdetails
19pass FAIL FAIL FAIL BUG FAIL FAIL pass pass pass ${!a} on array
detailsdetailsdetailsdetailsdetailsdetails
20pass FAIL FAIL FAIL pass pass FAIL pass pass pass All elements unquoted
detailsdetailsdetailsdetails
21pass FAIL FAIL pass pass pass FAIL pass pass pass All elements quoted
detailsdetailsdetails
22pass FAIL FAIL FAIL pass pass FAIL pass pass pass $*
detailsdetailsdetailsdetails
23pass FAIL FAIL pass pass pass FAIL pass pass pass "$*"
detailsdetailsdetails
24pass FAIL FAIL pass pass pass FAIL pass pass pass Interpolate array into array
detailsdetailsdetails
25pass FAIL FAIL pass pass pass FAIL FAIL FAIL pass Exporting array doesn't do anything, not even first element
detailsdetailsdetailsdetailsdetails
26N-I FAIL FAIL FAIL N-I FAIL FAIL FAIL FAIL pass strict_array prevents exporting array
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
27ok pass pass FAIL ok FAIL pass FAIL FAIL pass Arrays can't be used as env bindings
detailsdetailsdetailsdetailsdetailsdetails
28ok pass pass FAIL ok FAIL pass FAIL FAIL pass Associative arrays can't be used as env bindings either
detailsdetailsdetailsdetailsdetailsdetails
29pass FAIL FAIL FAIL pass pass FAIL pass pass pass Set element
detailsdetailsdetailsdetails
30pass FAIL FAIL FAIL pass pass FAIL pass pass pass Set element with var ref
detailsdetailsdetailsdetails
31pass FAIL FAIL FAIL pass pass FAIL pass FAIL pass Set element with array ref
detailsdetailsdetailsdetailsdetails
32BUG pass pass FAIL N-I FAIL pass FAIL FAIL pass Set array item to array
detailsdetailsdetailsdetailsdetailsdetails
33pass FAIL FAIL pass N-I FAIL FAIL pass pass pass Slice of array with [@]
detailsdetailsdetailsdetailsdetails
34pass FAIL FAIL pass N-I FAIL FAIL pass pass pass Negative slice begin
detailsdetailsdetailsdetailsdetails
35pass FAIL FAIL FAIL pass pass FAIL pass FAIL pass Negative slice length
detailsdetailsdetailsdetailsdetails
36pass FAIL FAIL FAIL N-I FAIL FAIL pass pass pass Slice with arithmetic
detailsdetailsdetailsdetailsdetailsdetails
37pass FAIL FAIL pass pass pass FAIL pass pass pass Number of elements
detailsdetailsdetails
38pass FAIL FAIL FAIL pass pass FAIL pass pass pass Length of an element
detailsdetailsdetailsdetails
39pass FAIL FAIL pass pass pass FAIL pass pass pass Iteration
detailsdetailsdetails
40pass FAIL FAIL pass pass pass FAIL pass pass pass glob within array yields separate elements
detailsdetailsdetails
41pass FAIL FAIL pass pass pass FAIL pass pass pass declare array and then append
detailsdetailsdetails
42ok FAIL FAIL pass pass pass FAIL FAIL FAIL pass Array syntax in wrong place
detailsdetailsdetailsdetailsdetailsdetails
43pass FAIL FAIL FAIL pass pass FAIL FAIL pass pass Single array with :-
detailsdetailsdetailsdetailsdetails
44pass FAIL FAIL FAIL N-I FAIL FAIL pass pass pass Stripping a whole array unquoted
detailsdetailsdetailsdetailsdetailsdetails
45pass FAIL FAIL pass N-I FAIL FAIL pass pass pass Stripping a whole array quoted
detailsdetailsdetailsdetailsdetails
46ok pass pass FAIL ok FAIL pass FAIL FAIL pass Multiple subscripts not allowed
detailsdetailsdetailsdetailsdetailsdetails
47ok pass pass FAIL ok FAIL pass FAIL FAIL pass Length op, index op, then transform op is not allowed
detailsdetailsdetailsdetailsdetailsdetails
48pass FAIL FAIL pass pass pass FAIL pass pass pass ${mystr[@]} and ${mystr[*]} are no-ops
detailsdetailsdetails
49N-I FAIL FAIL FAIL N-I FAIL pass FAIL FAIL pass ${mystr[@]} and ${mystr[*]} disallowed with strict_array
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
50pass FAIL FAIL pass pass pass FAIL pass pass pass Create a "user" array out of the argv array
detailsdetailsdetails
51pass FAIL FAIL pass pass pass FAIL pass pass pass Tilde expansion within array
detailsdetailsdetails
52pass FAIL FAIL pass pass pass FAIL pass pass pass Brace Expansion within Array
detailsdetailsdetails
53pass FAIL FAIL pass pass pass FAIL FAIL FAIL pass array default
detailsdetailsdetailsdetailsdetails
54ok FAIL FAIL FAIL ok FAIL FAIL FAIL FAIL pass Singleton Array Copy and Assign. OSH can't index strings with ints
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
55pass FAIL FAIL pass pass pass FAIL pass pass pass declare -a / local -a is empty array
detailsdetailsdetails
56pass FAIL FAIL FAIL pass pass TIME pass pass pass Create sparse array
detailsdetailsdetailsdetails
57pass FAIL FAIL FAIL pass pass FAIL pass pass pass Create sparse array implicitly
detailsdetailsdetailsdetails
58pass FAIL FAIL FAIL pass pass TIME FAIL pass pass Append sparse arrays
detailsdetailsdetailsdetailsdetails
59pass FAIL FAIL FAIL N-I FAIL FAIL pass FAIL pass Slice of sparse array with [@]
detailsdetailsdetailsdetailsdetailsdetailsdetails
60pass FAIL FAIL FAIL pass pass FAIL pass pass pass Using an array itself as the index on LHS
detailsdetailsdetailsdetails
61pass FAIL FAIL FAIL pass pass FAIL pass pass pass Using an array itself as the index on RHS
detailsdetailsdetailsdetails
62pass FAIL FAIL FAIL pass pass FAIL pass pass pass a[$x$y] on LHS and RHS
detailsdetailsdetailsdetails
63pass N-I FAIL pass pass pass FAIL pass pass pass Dynamic parsing of LHS a[$code]=value
detailsdetailsdetails
64pass FAIL FAIL ok pass pass FAIL pass pass pass Dynamic parsing of RHS ${a[$code]}
detailsdetailsdetailsdetails
65pass FAIL FAIL FAIL N-I pass FAIL FAIL FAIL pass Is element set? test -v a[i]
detailsdetailsdetailsdetailsdetailsdetailsdetails
66pass FAIL FAIL FAIL N-I pass FAIL FAIL FAIL pass [[ -v a[i] ]]
detailsdetailsdetailsdetailsdetailsdetailsdetails
67pass FAIL FAIL FAIL N-I pass FAIL FAIL FAIL FAIL test -v a[i] with arith expressions
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
68pass FAIL FAIL FAIL N-I pass FAIL FAIL FAIL FAIL More arith expressions in [[ -v array[expr]] ]]
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
69ok FAIL FAIL FAIL N-I FAIL FAIL FAIL FAIL pass Regression: Assigning with out-of-range negative index
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
70pass FAIL FAIL FAIL N-I FAIL FAIL FAIL FAIL pass Regression: Negative index in [[ -v a[index] ]]
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
71ok FAIL FAIL FAIL N-I FAIL TIME FAIL FAIL pass Regression: Negative out-of-range index in [[ -v a[index] ]]
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
72N-I FAIL FAIL FAIL N-I FAIL FAIL FAIL FAIL pass a+=() modifies existing instance of BashArray
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
73ok FAIL FAIL FAIL N-I FAIL FAIL FAIL FAIL pass Regression: unset a[-2]: out-of-bound negative index should cause error
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
74pass FAIL FAIL FAIL N-I FAIL FAIL pass pass pass Regression: Out-of-bound negative offset for ${a[@]:offset}
detailsdetailsdetailsdetailsdetailsdetails
75pass FAIL FAIL FAIL N-I FAIL FAIL FAIL FAIL pass Regression: Array length after unset
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
76ok FAIL FAIL FAIL N-I FAIL FAIL FAIL FAIL pass Regression: ${a[@]@Q} crash with `a[0]=x a[2]=y`
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
77ok FAIL FAIL FAIL N-I FAIL FAIL FAIL FAIL pass Regression: silent out-of-bound negative index in ${a[-2]} and $((a[-2]))
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
365 passed, 19 OK, 28 not implemented, 7 BUG, 357 failed, 4 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

dash0 nounset / set -u with empty array (bug in bash 4.3, fixed in 4.4)

[dash stdout] Expected '[]\nstatus=0\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 2: Syntax error: "(" unexpected
ash0 nounset / set -u with empty array (bug in bash 4.3, fixed in 4.4)

[ash stdout] Expected '[]\nstatus=0\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
mksh0 nounset / set -u with empty array (bug in bash 4.3, fixed in 4.4)

stdout:
stderr: 
mksh: <stdin>[3]: empty[@]: parameter not set
ksh0 nounset / set -u with empty array (bug in bash 4.3, fixed in 4.4)

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

stdout:
stderr: 
E: ksh: <stdin>[3]: empty[@]: parameter not set
toysh0 nounset / set -u with empty array (bug in bash 4.3, fixed in 4.4)

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

stdout:
stderr: 
set: bad -o nounset
main: line 2: sh: syntax error: argv.py
dash1 local array

[dash stdout] Expected "['1']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 2: Syntax error: "(" unexpected (expecting "}")
ash1 local array

[ash stdout] Expected "['1']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "(" (expecting "}")
zsh1 local array

[zsh stdout] Expected "['1']\n", got "['']\n"

stdout:
['']
stderr:
mksh1 local array

stdout:
stderr: 
mksh: <stdin>[2]: syntax error: '(' unexpected
ksh1 local array

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

stdout:
stderr: 
E: ksh: <stdin>[2]: syntax error: unexpected '('
toysh1 local array

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

stdout:
stderr: 
main: line 1: sh: syntax error: )
dash2 Command with with word splitting in array

[dash stdout] Expected "['1 2', '3', '4']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash2 Command with with word splitting in array

[ash stdout] Expected "['1 2', '3', '4']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
toysh2 Command with with word splitting in array

[toysh stdout] Expected "['1 2', '3', '4']\n", got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: '1 2'
zsh3 space before ( in array initialization

[zsh status] Expected 2, got 0

stdout:
stderr: 
zsh: parse error near `('
mksh3 space before ( in array initialization

stdout:
1
stderr:
ksh3 space before ( in array initialization

[ksh status] Expected 2, got 0

stdout:
1
stderr:
sush3 space before ( in array initialization

[sush status] Expected 2, got 0

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: Unexpected token: (1
brush3 space before ( in array initialization

[brush status] Expected 2, got 0

stdout:
1
stderr:
dash4 array over multiple lines

[dash stdout] Expected "['1', '2 3']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash4 array over multiple lines

[ash stdout] Expected "['1', '2 3']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
toysh4 array over multiple lines

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

stdout:
stderr: 
main: line 1: sh: syntax error: function(
zsh5 array with invalid token

[zsh status] Expected 2, got 0

stdout:
['']
stderr:
zsh: parse error near `&'
zsh: command not found: 2 3
zsh: parse error near `)'
mksh5 array with invalid token

stdout:
stderr: 
mksh: <stdin>[3]: syntax error: '&' unexpected
ksh5 array with invalid token

[ksh status] Expected 2, got 1

stdout:
stderr: 
E: ksh: <stdin>[3]: syntax error: unexpected '&'
sush5 array with invalid token

[sush status] Expected 2, got 0

stdout:
[]
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: syntax error near &
brush5 array with invalid token

[brush status] Expected 2, got 0

stdout:
[]
stderr:
ERROR main: syntax error near token `&' (line 3 col 1)
2 3: command not found
ERROR main: syntax error near token `)' (line 1 col 1)
dash6 array with empty string

[dash stdout] Expected "['']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash6 array with empty string

[ash stdout] Expected "['']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
toysh6 array with empty string

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

stdout:
stderr: 
main: line 1: sh: syntax error: ''
sush6 array with empty string

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

stdout:
[]
stderr:
dash7 Retrieve index

[dash stdout] Expected "['2 3']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash7 Retrieve index

[ash stdout] Expected "['2 3']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh7 Retrieve index

[zsh stdout] Expected "['2 3']\n", got "['1']\n"

stdout:
['1']
stderr:
toysh7 Retrieve index

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash8 Retrieve out of bounds index

[dash stdout] Expected "['']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash8 Retrieve out of bounds index

[ash stdout] Expected "['']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
toysh8 Retrieve out of bounds index

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash9 Negative index

[dash stdout] Expected "['2 3', '1', '']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash9 Negative index

[ash stdout] Expected "['2 3', '1', '']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
mksh9 Negative index

stdout:
['', '', '']
stderr:
ksh9 Negative index

[ksh stdout] Expected "['2 3', '1', '']\n", got "['', '', '']\n"

stdout:
['', '', '']
stderr:
toysh9 Negative index

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
sush9 Negative index

[sush stdout] Expected "['2 3', '1', '']\n", got "['', '', '']\n"

stdout:
['', '', '']
stderr:
dash10 Negative index and sparse array

[dash stdout] Expected '0 2 3\n-1 3\n-2 2\n-3\n-4 0\n-5\n0 2 30\n0 2 72\n' Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash10 Negative index and sparse array

[ash stdout] Expected '0 2 3\n-1 3\n-2 2\n-3\n-4 0\n-5\n0 2 30\n0 2 72\n' Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh10 Negative index and sparse array

[zsh stdout] Expected '0 2 3\n-1 3\n-2 2\n-3\n-4 0\n-5\n0 2 30\n0 2 72\n' Got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: no matches found: a[1]
mksh10 Negative index and sparse array

stdout:
0 2 3
-1
-2
-3
-4
-5
0 2 3 0
0 2 3 42
stderr:
ksh10 Negative index and sparse array

[ksh stdout] Expected '0 2 3\n-1 3\n-2 2\n-3\n-4 0\n-5\n0 2 30\n0 2 72\n' Got '0 2 3\n-1\n-2\n-3\n-4\n-5\n0 2 3 0\n0 2 3 42\n'

stdout:
0 2 3
-1
-2
-3
-4
-5
0 2 3 0
0 2 3 42
stderr:
toysh10 Negative index and sparse array

[toysh stdout] Expected '0 2 3\n-1 3\n-2 2\n-3\n-4 0\n-5\n0 2 30\n0 2 72\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: 0
sush10 Negative index and sparse array

[sush stdout] Expected '0 2 3\n-1 3\n-2 2\n-3\n-4 0\n-5\n0 2 30\n0 2 72\n' Got '0 2 3\n-1\n-2\n-3\n-4\n-5\n0 2 3\n0 2 3\n'

stdout:
0 2 3
-1
-2
-3
-4
-5
0 2 3
0 2 3
stderr:
brush10 Negative index and sparse array

[brush stdout] Expected '0 2 3\n-1 3\n-2 2\n-3\n-4 0\n-5\n0 2 30\n0 2 72\n' Got '0 2 3\n-1 2\n-2\n-3 0\n-4\n-5\n00 2 3\n44 2 3\n'

stdout:
0 2 3
-1 2
-2
-3 0
-4
-5
00 2 3
44 2 3
stderr:
dash11 Negative index and sparse array

[dash stdout] Expected '0 0\n2 2\n3 3\n0\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash11 Negative index and sparse array

[ash stdout] Expected '0 0\n2 2\n3 3\n0\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh11 Negative index and sparse array

[zsh stdout] Expected '0 0\n2 2\n3 3\n0\n', got '0\n0 0\n0\n2 2\n'

stdout:
0
0 0
0
2 2
stderr:
mksh11 Negative index and sparse array

stdout:
0 0
1 1
2 2
3 3
stderr:
ksh11 Negative index and sparse array

[ksh stdout] Expected '0 0\n2 2\n3 3\n0\n', got '0 0\n1 1\n2 2\n3 3\n'

stdout:
0 0
1 1
2 2
3 3
stderr:
toysh11 Negative index and sparse array

[toysh stdout] Expected '0 0\n2 2\n3 3\n0\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: 0
sush11 Negative index and sparse array

[sush stdout] Expected '0 0\n2 2\n3 3\n0\n', got '0 0\n1 1\n2 2\n3 3\n'

stdout:
0 0
1 1
2 2
3 3
stderr:
brush11 Negative index and sparse array

[brush stdout] Expected '0 0\n2 2\n3 3\n0\n', got '0\n1 1\n2 2\n3 3\n'

stdout:
0
1 1
2 2
3 3
stderr:
dash12 Length after unset

[dash stdout] Expected 'len=3\nlen=2\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash12 Length after unset

[ash stdout] Expected 'len=3\nlen=2\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh12 Length after unset

[zsh stdout] Expected 'len=3\nlen=2\n', got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: no matches found: a[-1]
mksh12 Length after unset

stdout:
len=4
len=4
stderr:
ksh12 Length after unset

[ksh stdout] Expected 'len=3\nlen=2\n', got 'len=4\nlen=4\n'

stdout:
len=4
len=4
stderr:
toysh12 Length after unset

[toysh stdout] Expected 'len=3\nlen=2\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: 0
sush12 Length after unset

[sush stdout] Expected 'len=3\nlen=2\n', got 'len=4\nlen=4\n'

stdout:
len=4
len=4
stderr:
brush12 Length after unset

[brush stdout] Expected 'len=3\nlen=2\n', got 'len=3\nlen=3\n'

stdout:
len=3
len=3
stderr:
dash13 Retrieve index that is a variable

[dash stdout] Expected "['2 3']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash13 Retrieve index that is a variable

[ash stdout] Expected "['2 3']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh13 Retrieve index that is a variable

[zsh stdout] Expected "['2 3']\n", got "['1']\n"

stdout:
['1']
stderr:
toysh13 Retrieve index that is a variable

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash14 Retrieve index that is a variable without $

[dash stdout] Expected "['2 3']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash14 Retrieve index that is a variable without $

[ash stdout] Expected "['2 3']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh14 Retrieve index that is a variable without $

[zsh stdout] Expected "['2 3']\n", got "['1']\n"

stdout:
['1']
stderr:
toysh14 Retrieve index that is a variable without $

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash15 Retrieve index that is a command sub

[dash stdout] Expected "['2 3']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash15 Retrieve index that is a command sub

[ash stdout] Expected "['2 3']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh15 Retrieve index that is a command sub

[zsh stdout] Expected "['2 3']\n", got "['1']\n"

stdout:
['1']
stderr:
toysh15 Retrieve index that is a command sub

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash16 Retrieve array indices with ${!a}

[dash stdout] Expected "['0', '1']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash16 Retrieve array indices with ${!a}

[ash stdout] Expected "['0', '1']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh16 Retrieve array indices with ${!a}

[zsh stdout] Expected "['0', '1']\n", got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: bad substitution
toysh16 Retrieve array indices with ${!a}

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash17 Retrieve sparse array indices with ${!a}

[dash stdout] Expected "['99']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash17 Retrieve sparse array indices with ${!a}

[ash stdout] Expected "['99']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh17 Retrieve sparse array indices with ${!a}

[zsh stdout] Expected "['99']\n", got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: bad substitution
dash18 ${!a[1]} is named ref in bash

[dash stdout] Expected "['bar']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 2: Syntax error: "(" unexpected
ash18 ${!a[1]} is named ref in bash

[ash stdout] Expected "['bar']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh18 ${!a[1]} is named ref in bash

[zsh stdout] Expected "['bar']\n", got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: bad substitution
mksh18 ${!a[1]} is named ref in bash

stdout:
['a[1]']
stderr:
ksh18 ${!a[1]} is named ref in bash

[ksh stdout] Expected "['bar']\n", got "['a[1]']\n"

stdout:
['a[1]']
stderr:
toysh18 ${!a[1]} is named ref in bash

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

stdout:
stderr: 
main: line 2: sh: syntax error: '1 2'
dash19 ${!a} on array

[dash stdout] Expected "['']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash19 ${!a} on array

[ash stdout] Expected "['']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh19 ${!a} on array

[zsh stdout] Expected "['']\n", got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: bad substitution
mksh19 ${!a} on array

stdout:
['a']
stderr:
ksh19 ${!a} on array

[ksh stdout] Expected "['']\n", got "['a']\n"

stdout:
['a']
stderr:
toysh19 ${!a} on array

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash20 All elements unquoted

[dash stdout] Expected "['1', '2', '3']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash20 All elements unquoted

[ash stdout] Expected "['1', '2', '3']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh20 All elements unquoted

[zsh stdout] Expected "['1', '2', '3']\n", got "['1', '2 3']\n"

stdout:
['1', '2 3']
stderr:
toysh20 All elements unquoted

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash21 All elements quoted

[dash stdout] Expected "['1', '2 3']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash21 All elements quoted

[ash stdout] Expected "['1', '2 3']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
toysh21 All elements quoted

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash22 $*

[dash stdout] Expected "['1', '2', '3']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash22 $*

[ash stdout] Expected "['1', '2', '3']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh22 $*

[zsh stdout] Expected "['1', '2', '3']\n", got "['1', '2 3']\n"

stdout:
['1', '2 3']
stderr:
toysh22 $*

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash23 "$*"

[dash stdout] Expected "['1 2 3']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash23 "$*"

[ash stdout] Expected "['1 2 3']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
toysh23 "$*"

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash24 Interpolate array into array

[dash stdout] Expected "['0', '1', '2 3', '4 5']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash24 Interpolate array into array

[ash stdout] Expected "['0', '1', '2 3', '4 5']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
toysh24 Interpolate array into array

[toysh stdout] Expected "['0', '1', '2 3', '4 5']\n", got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash25 Exporting array doesn't do anything, not even first element

[dash stdout] Expected 'mystr\nNone\nNone\n', got 'mystr\n'
[dash status] Expected 0, got 2

stdout:
mystr
stderr:
dash: 6: Syntax error: "(" unexpected
ash25 Exporting array doesn't do anything, not even first element

[ash stdout] Expected 'mystr\nNone\nNone\n', got 'mystr\n'
[ash status] Expected 0, got 2

stdout:
mystr
stderr:
ash: syntax error: unexpected "("
toysh25 Exporting array doesn't do anything, not even first element

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

stdout:
mystr
stderr:
main: line 6: sh: syntax error: myarray
sush25 Exporting array doesn't do anything, not even first element

[sush stdout] Expected 'mystr\nNone\nNone\n', got 'mystr\nmystr\nmystr\n'

stdout:
mystr
mystr
mystr
stderr:
brush25 Exporting array doesn't do anything, not even first element

[brush stdout] Expected 'mystr\nNone\nNone\n', got 'None\nNone\nNone\n'

stdout:
None
None
None
stderr:
bash26 strict_array prevents exporting array

stdout:
None
stderr:
bash: line 1: shopt: strict_array: invalid shell option name
dash26 strict_array prevents exporting array

[dash status] Expected 1, got 2

stdout:
stderr: 
dash: 1: shopt: not found
dash: 4: Syntax error: "(" unexpected
ash26 strict_array prevents exporting array

[ash status] Expected 1, got 2

stdout:
stderr: 
ash: shopt: not found
ash: syntax error: unexpected "("
zsh26 strict_array prevents exporting array

[zsh stdout] Expected '', got 'None\n'
[zsh status] Expected 1, got 0

stdout:
None
stderr:
zsh: command not found: shopt
mksh26 strict_array prevents exporting array

stdout:
None
stderr:
mksh: <stdin>[1]: shopt: not found
ksh26 strict_array prevents exporting array

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

stdout:
None
stderr:
E: ksh: <stdin>[1]: shopt: inaccessible or not found
toysh26 strict_array prevents exporting array

[toysh status] Expected 1, got 2

stdout:
stderr: 
sh: shopt: No such file or directory
main: line 4: sh: syntax error: a
sush26 strict_array prevents exporting array

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

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: shopt: strict_array: not supported yet
brush26 strict_array prevents exporting array

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

stdout:
None
stderr:
shopt: strict_array: invalid shell option name
bash27 Arrays can't be used as env bindings

stdout:
a
(b b)
stderr:
zsh27 Arrays can't be used as env bindings

[zsh stdout] Expected u'', got 'a\nNone\n'
[zsh status] Expected 2, got 0

stdout:
a
None
stderr:
mksh27 Arrays can't be used as env bindings

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh27 Arrays can't be used as env bindings

[ksh status] Expected 2, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
sush27 Arrays can't be used as env bindings

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

stdout:
a

stderr:
brush27 Arrays can't be used as env bindings

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

stdout:
a
b
stderr:
bash28 Associative arrays can't be used as env bindings either

stdout:
a
([k]=v)
stderr:
zsh28 Associative arrays can't be used as env bindings either

[zsh status] Expected 2, got 1

stdout:
stderr: 
zsh: no matches found: [k]=v
mksh28 Associative arrays can't be used as env bindings either

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh28 Associative arrays can't be used as env bindings either

[ksh status] Expected 2, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
sush28 Associative arrays can't be used as env bindings either

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

stdout:
a

stderr:
brush28 Associative arrays can't be used as env bindings either

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

stdout:
a
v
stderr:
dash29 Set element

[dash stdout] Expected "['9', '2 3']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash29 Set element

[ash stdout] Expected "['9', '2 3']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh29 Set element

[zsh stdout] Expected "['9', '2 3']\n", got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: a: assignment to invalid subscript range
toysh29 Set element

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash30 Set element with var ref

[dash stdout] Expected "['9', '2 3']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash30 Set element with var ref

[ash stdout] Expected "['9', '2 3']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh30 Set element with var ref

[zsh stdout] Expected "['9', '2 3']\n", got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: a: assignment to invalid subscript range
toysh30 Set element with var ref

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash31 Set element with array ref

[dash stdout] Expected "['1', '9']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash31 Set element with array ref

[ash stdout] Expected "['1', '9']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh31 Set element with array ref

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

stdout:
stderr: 
zsh: a: assignment to invalid subscript range
toysh31 Set element with array ref

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
brush31 Set element with array ref

[brush stdout] Expected "['1', '9']\n", got "['1', '2 3']\n"

stdout:
['1', '2 3']
stderr:
a[1]=9: command not found
bash32 Set array item to array

stdout:
status=1
stderr:
bash: line 2: a[0]: cannot assign list to array member
zsh32 Set array item to array

[zsh status] Expected 2, got 1

stdout:
stderr: 
zsh: a: assignment to invalid subscript range
mksh32 Set array item to array

stdout:
stderr: 
mksh: <stdin>[2]: set: a[0]: is not an identifier
ksh32 Set array item to array

[ksh status] Expected 2, got 1

stdout:
stderr: 
E: ksh: <stdin>[2]: set: a[0]: not an identifier
sush32 Set array item to array

[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 2: a[0]: cannot assign list to array member
brush32 Set array item to array

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

stdout:
status=1
stderr:
ERROR error: not yet implemented: replacing an array item with an array
dash33 Slice of array with [@]

[dash stdout] Expected "['2', '3']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash33 Slice of array with [@]

[ash stdout] Expected "['2', '3']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
mksh33 Slice of array with [@]

stdout:
stderr: 
mksh: <stdin>[2]: ${a[@]: 1:2}: bad substitution
ksh33 Slice of array with [@]

[ksh stdout] Expected "['2', '3']\n", got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[2]: ${a[@]: 1:2}: bad substitution
toysh33 Slice of array with [@]

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash34 Negative slice begin

[dash stdout] Expected "['2', '3', '4', '5']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash34 Negative slice begin

[ash stdout] Expected "['2', '3', '4', '5']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
mksh34 Negative slice begin

stdout:
stderr: 
mksh: <stdin>[2]: ${a[@]: (-4)}: bad substitution
ksh34 Negative slice begin

[ksh stdout] Expected "['2', '3', '4', '5']\n", got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[2]: ${a[@]: (-4)}: bad substitution
toysh34 Negative slice begin

[toysh stdout] Expected "['2', '3', '4', '5']\n", got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash35 Negative slice length

[dash status] Expected 1, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash35 Negative slice length

[ash status] Expected 1, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh35 Negative slice length

[zsh stdout] Expected u'', got "['2']\n"
[zsh status] Expected 1, got 0

stdout:
['2']
stderr:
toysh35 Negative slice length

[toysh status] Expected 1, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: 1
brush35 Negative slice length

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

stdout:
['2', '3']
stderr:
dash36 Slice with arithmetic

[dash stdout] Expected "['2', '3']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash36 Slice with arithmetic

[ash stdout] Expected "['2', '3']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh36 Slice with arithmetic

[zsh stdout] Expected "['2', '3']\n", got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: unrecognized modifier `i'
mksh36 Slice with arithmetic

stdout:
stderr: 
mksh: <stdin>[3]: ${a[@]:i-4:2}: bad substitution
ksh36 Slice with arithmetic

[ksh stdout] Expected "['2', '3']\n", got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[3]: ${a[@]: i-4:2}: bad substitution
toysh36 Slice with arithmetic

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash37 Number of elements

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

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash37 Number of elements

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

stdout:
stderr: 
ash: syntax error: unexpected "("
toysh37 Number of elements

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash38 Length of an element

[dash stdout] Expected '3\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash38 Length of an element

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

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh38 Length of an element

[zsh stdout] Expected '3\n', got '1\n'

stdout:
1
stderr:
toysh38 Length of an element

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash39 Iteration

[dash stdout] Expected '1\n2 3\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash39 Iteration

[ash stdout] Expected '1\n2 3\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
toysh39 Iteration

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
dash40 glob within array yields separate elements

[dash stdout] Expected "['_tmp/y.Y', '_tmp/yy.Y']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 2: Syntax error: "(" unexpected
ash40 glob within array yields separate elements

[ash stdout] Expected "['_tmp/y.Y', '_tmp/yy.Y']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
toysh40 glob within array yields separate elements

[toysh stdout] Expected "['_tmp/y.Y', '_tmp/yy.Y']\n", got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 2: sh: syntax error: _tmp/*.Y
dash41 declare array and then append

[dash stdout] Expected "['a', 'b', 'c']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: Syntax error: word unexpected (expecting ")")
ash41 declare array and then append

[ash stdout] Expected "['a', 'b', 'c']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: declare: not found
ash: syntax error: unexpected word (expecting ")")
toysh41 declare array and then append

[toysh stdout] Expected "['a', 'b', 'c']\n", got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 2: sh: syntax error: a
bash42 Array syntax in wrong place

stdout:
stderr: 
bash: line 1: syntax error near unexpected token `('
bash: line 1: `ls foo=(1 2)'
dash42 Array syntax in wrong place

[dash status] Expected 1, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash42 Array syntax in wrong place

[ash status] Expected 1, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
toysh42 Array syntax in wrong place

[toysh status] Expected 1, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: )
sush42 Array syntax in wrong place

[sush status] Expected 1, got 2

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: Unexpected token: (1
brush42 Array syntax in wrong place

[brush status] Expected 1, got 2

stdout:
stderr: 
ls: cannot access 'foo=(1': No such file or directory
ls: cannot access '2)': No such file or directory
dash43 Single array with :-

[dash stdout] Expected "['none', 'x', 'none']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash43 Single array with :-

[ash stdout] Expected "['none', 'x', 'none']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh43 Single array with :-

[zsh stdout] Expected "['none', 'x', 'none']\n", got "['x', '']\n"

stdout:
['x', '']
stderr:
toysh43 Single array with :-

[toysh stdout] Expected "['none', 'x', 'none']\n", got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: ''
sush43 Single array with :-

[sush stdout] Expected "['none', 'x', 'none']\n", got "['none', 'x']\n"

stdout:
['none', 'x']
stderr:
dash44 Stripping a whole array unquoted

[dash stdout] Expected "['foo', 'sp', 'ace.h', 'bar']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash44 Stripping a whole array unquoted

[ash stdout] Expected "['foo', 'sp', 'ace.h', 'bar']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh44 Stripping a whole array unquoted

[zsh stdout] Expected "['foo', 'sp', 'ace.h', 'bar']\n", got "['foo', 'sp ace.h', 'bar']\n"

stdout:
['foo', 'sp ace.h', 'bar']
stderr:
mksh44 Stripping a whole array unquoted

stdout:
stderr: 
mksh: <stdin>[2]: ${files[@]%.c}: bad substitution
ksh44 Stripping a whole array unquoted

[ksh stdout] Expected "['foo', 'sp', 'ace.h', 'bar']\n", got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[2]: ${files[@]%.c}: bad substitution
toysh44 Stripping a whole array unquoted

[toysh stdout] Expected "['foo', 'sp', 'ace.h', 'bar']\n", got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: 'foo.c'
dash45 Stripping a whole array quoted

[dash stdout] Expected "['foo', 'sp ace.h', 'bar']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash45 Stripping a whole array quoted

[ash stdout] Expected "['foo', 'sp ace.h', 'bar']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
mksh45 Stripping a whole array quoted

stdout:
stderr: 
mksh: <stdin>[2]: ${files[@]%.c}: bad substitution
ksh45 Stripping a whole array quoted

[ksh stdout] Expected "['foo', 'sp ace.h', 'bar']\n", got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[2]: ${files[@]%.c}: bad substitution
toysh45 Stripping a whole array quoted

[toysh stdout] Expected "['foo', 'sp ace.h', 'bar']\n", got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: 'foo.c'
bash46 Multiple subscripts not allowed

stdout:
stderr: 
bash: line 2: ${a[0][0]}: bad substitution
zsh46 Multiple subscripts not allowed

[zsh stdout] Expected u'', got "['', '']\n"
[zsh status] Expected 2, got 0

stdout:
['', '']
stderr:
mksh46 Multiple subscripts not allowed

stdout:
stderr: 
mksh: <stdin>[2]: ${a[0][0]}: bad substitution
ksh46 Multiple subscripts not allowed

[ksh status] Expected 2, got 1

stdout:
stderr: 
E: ksh: <stdin>[2]: ${a[0][0]}: bad substitution
sush46 Multiple subscripts not allowed

[sush status] Expected 2, got 1

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: `${a[0][0]}': bad substitution
brush46 Multiple subscripts not allowed

[brush stdout] Expected u'', got "['123', '${a[0][0]}']\n"
[brush status] Expected 2, got 0

stdout:
['123', '${a[0][0]}']
stderr:
bash47 Length op, index op, then transform op is not allowed

stdout:
stderr: 
bash: line 2: ${#a[0]/1/xxx}: bad substitution
zsh47 Length op, index op, then transform op is not allowed

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

stdout:
0 0
stderr:
mksh47 Length op, index op, then transform op is not allowed

stdout:
stderr: 
mksh: <stdin>[2]: ${#a[0]/1/xxx}: bad substitution
ksh47 Length op, index op, then transform op is not allowed

[ksh status] Expected 2, got 1

stdout:
stderr: 
E: ksh: <stdin>[2]: ${#a[0]/1/xxx}: bad substitution
sush47 Length op, index op, then transform op is not allowed

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

stdout:
3 3
stderr:
brush47 Length op, index op, then transform op is not allowed

[brush stdout] Expected u'', got '3 ${#a[0]/1/xxx}\n'
[brush status] Expected 2, got 0

stdout:
3 ${#a[0]/1/xxx}
stderr:
dash48 ${mystr[@]} and ${mystr[*]} are no-ops

[dash stdout] Expected 'abc\nabc\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 2: Bad substitution
ash48 ${mystr[@]} and ${mystr[*]} are no-ops

[ash stdout] Expected 'abc\nabc\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: bad substitution
toysh48 ${mystr[@]} and ${mystr[*]} are no-ops

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

stdout:
stderr: 
main: line 2: sh: s: [@]}
main: line 3: sh: s: [*]}
bash49 ${mystr[@]} and ${mystr[*]} disallowed with strict_array

stdout:
abc
status=0
abc
status=0
stderr:
bash: line 1: shopt: strict_array: invalid shell option name
bash: line 1: shopt: strict_array: invalid shell option name
dash49 ${mystr[@]} and ${mystr[*]} disallowed with strict_array

[dash stdout] Expected 'status=1\nstatus=1\n', got 'status=2\nstatus=2\n'

stdout:
status=2
status=2
stderr:
dash: 1: shopt: not found
dash: 1: Bad substitution
dash: 1: shopt: not found
dash: 1: Bad substitution
ash49 ${mystr[@]} and ${mystr[*]} disallowed with strict_array

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

stdout:
status=2
status=2
stderr:
ash: shopt: not found
ash: syntax error: bad substitution
ash: shopt: not found
ash: syntax error: bad substitution
zsh49 ${mystr[@]} and ${mystr[*]} disallowed with strict_array

[zsh stdout] Expected 'status=1\nstatus=1\n', got 'abc\nstatus=0\nabc\nstatus=0\n'

stdout:
abc
status=0
abc
status=0
stderr:
zsh:1: command not found: shopt
zsh:1: command not found: shopt
mksh49 ${mystr[@]} and ${mystr[*]} disallowed with strict_array

stdout:
abc
status=0
abc
status=0
stderr:
mksh: shopt: not found
mksh: shopt: not found
ksh49 ${mystr[@]} and ${mystr[*]} disallowed with strict_array

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

stdout:
abc
status=0
abc
status=0
stderr:
E: ksh: shopt: inaccessible or not found
E: ksh: shopt: inaccessible or not found
sush49 ${mystr[@]} and ${mystr[*]} disallowed with strict_array

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

stdout:
abc
status=0
abc
status=0
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: shopt: strict_array: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: shopt: strict_array: not supported yet
brush49 ${mystr[@]} and ${mystr[*]} disallowed with strict_array

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

stdout:
abc
status=0
abc
status=0
stderr:
shopt: strict_array: invalid shell option name
shopt: strict_array: invalid shell option name
dash50 Create a "user" array out of the argv array

[dash stdout] Expected "['x y', 'z', 'a b', 'c']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 2: Syntax error: "(" unexpected
ash50 Create a "user" array out of the argv array

[ash stdout] Expected "['x y', 'z', 'a b', 'c']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
toysh50 Create a "user" array out of the argv array

[toysh stdout] Expected "['x y', 'z', 'a b', 'c']\n", got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
set: bad --
main: line 2: sh: syntax error: 'x y'
dash51 Tilde expansion within array

[dash stdout] Expected '/home/bob/src /home/bob/git\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 2: Syntax error: "(" unexpected
ash51 Tilde expansion within array

[ash stdout] Expected '/home/bob/src /home/bob/git\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
toysh51 Tilde expansion within array

[toysh stdout] Expected '/home/bob/src /home/bob/git\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 2: sh: syntax error: ~/src
dash52 Brace Expansion within Array

[dash stdout] Expected '-a -b c- d-\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash52 Brace Expansion within Array

[ash stdout] Expected '-a -b c- d-\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
toysh52 Brace Expansion within Array

[toysh stdout] Expected '-a -b c- d-\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: -{a,b}
dash53 array default

[dash stdout] Expected "['1 2', '3']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash53 array default

[ash stdout] Expected "['1 2', '3']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
toysh53 array default

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

stdout:
stderr: 
main: line 1: sh: syntax error: '1 2'
sush53 array default

[sush stdout] Expected "['1 2', '3']\n", got '[]\n'

stdout:
[]
stderr:
brush53 array default

[brush stdout] Expected "['1 2', '3']\n", got "['1 2 3']\n"

stdout:
['1 2 3']
stderr:
bash54 Singleton Array Copy and Assign. OSH can't index strings with ints

stdout:
4 4
1 1
4 4
1 1
stderr:
dash54 Singleton Array Copy and Assign. OSH can't index strings with ints

[dash stdout] Expected '4 4\n1 1\n', got ''
[dash status] Expected 1, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash54 Singleton Array Copy and Assign. OSH can't index strings with ints

[ash stdout] Expected '4 4\n1 1\n', got ''
[ash status] Expected 1, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh54 Singleton Array Copy and Assign. OSH can't index strings with ints

[zsh stdout] Expected '4 4\n1 1\n', got '0 0\n1 1\n0 0\n4 4\n'
[zsh status] Expected 1, got 0

stdout:
0 0
1 1
0 0
4 4
stderr:
mksh54 Singleton Array Copy and Assign. OSH can't index strings with ints

stdout:
4 4
1 1
4 4
1 1
stderr:
ksh54 Singleton Array Copy and Assign. OSH can't index strings with ints

[ksh stdout] Expected '4 4\n1 1\n', got '4 4\n1 1\n4 4\n1 1\n'
[ksh status] Expected 1, got 0

stdout:
4 4
1 1
4 4
1 1
stderr:
toysh54 Singleton Array Copy and Assign. OSH can't index strings with ints

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

stdout:
stderr: 
main: line 1: sh: syntax error: '12 3'
sush54 Singleton Array Copy and Assign. OSH can't index strings with ints

[sush stdout] Expected '4 4\n1 1\n', got '4 4\n1 1\n4 4\n0 0\n'
[sush status] Expected 1, got 0

stdout:
4 4
1 1
4 4
0 0
stderr:
brush54 Singleton Array Copy and Assign. OSH can't index strings with ints

[brush stdout] Expected '4 4\n1 1\n', got '4 4\n1 1\n4 4\n1 1\n'
[brush status] Expected 1, got 0

stdout:
4 4
1 1
4 4
1 1
stderr:
dash55 declare -a / local -a is empty array

[dash stdout] Expected "[]\n['x']\n[]\n['x']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: Bad substitution
ash55 declare -a / local -a is empty array

[ash stdout] Expected "[]\n['x']\n[]\n['x']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: declare: not found
ash: syntax error: bad substitution
toysh55 declare -a / local -a is empty array

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

stdout:
['']
stderr:
main: line 3: sh: syntax error: 'x'
dash56 Create sparse array

[dash stdout] Expected "len=1\n['1']\nunset=\nlen-of-unset=0\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash56 Create sparse array

[ash stdout] Expected "len=1\n['1']\nunset=\nlen-of-unset=0\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh56 Create sparse array

[zsh stdout] Expected "len=1\n['1']\nunset=\nlen-of-unset=0\n", got "len=99\n['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '1']\nunset=\nlen-of-unset=0\n"

stdout:
len=99
['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '1']
unset=
len-of-unset=0
stderr:
dash57 Create sparse array implicitly

[dash stdout] Expected "len=1\n['1']\nunset=\nlen-of-unset=0\n", got 'len=0\n'
[dash status] Expected 0, got 2

stdout:
len=0
stderr:
dash: 1: a[99]=1: not found
dash: 3: Bad substitution
ash57 Create sparse array implicitly

[ash stdout] Expected "len=1\n['1']\nunset=\nlen-of-unset=0\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: a[99]=1: not found
ash: syntax error: bad substitution
zsh57 Create sparse array implicitly

[zsh stdout] Expected "len=1\n['1']\nunset=\nlen-of-unset=0\n", got "len=99\n['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '1']\nunset=\nlen-of-unset=0\n"

stdout:
len=99
['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '1']
unset=
len-of-unset=0
stderr:
toysh57 Create sparse array implicitly

[toysh stdout] Expected "len=1\n['1']\nunset=\nlen-of-unset=0\n", got "['']\nunset=\n"
[toysh status] Expected 0, got 1

stdout:
['']
unset=
stderr:
main: line 1: sh: bad math:  a[99]=1  @ 2
main: line 2: sh: a: [@]}
main: line 5: sh: a: [33]}
dash58 Append sparse arrays

[dash stdout] Expected "['1', '2', '3']\n['1', '2', '3']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash58 Append sparse arrays

[ash stdout] Expected "['1', '2', '3']\n['1', '2', '3']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh58 Append sparse arrays

[zsh stdout] Expected "['1', '2', '3']\n['1', '2', '3']\n", got "['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '2', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '3']\n['1', '', '']\n"

stdout:
['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '2', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '3']
['1', '', '']
stderr:
sush58 Append sparse arrays

[sush stdout] Expected "['1', '2', '3']\n['1', '2', '3']\n", got "['1', '2', '3']\n['', '', '']\n"

stdout:
['1', '2', '3']
['', '', '']
stderr:
dash59 Slice of sparse array with [@]

[dash stdout] Expected "['1', '2']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: a[33]=1: not found
dash: 2: a[66]=2: not found
dash: 3: a[99]=2: not found
dash: 4: Bad substitution
ash59 Slice of sparse array with [@]

[ash stdout] Expected "['1', '2']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: a[33]=1: not found
ash: a[66]=2: not found
ash: a[99]=2: not found
ash: syntax error: bad substitution
zsh59 Slice of sparse array with [@]

[zsh stdout] Expected "['1', '2']\n", got "['', '']\n"

stdout:
['', '']
stderr:
mksh59 Slice of sparse array with [@]

stdout:
stderr: 
mksh: <stdin>[4]: ${a[@]: 15:2}: bad substitution
ksh59 Slice of sparse array with [@]

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

stdout:
stderr: 
E: ksh: <stdin>[4]: ${a[@]: 15:2}: bad substitution
toysh59 Slice of sparse array with [@]

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

stdout:
['']
stderr:
main: line 1: sh: bad math:  a[33]=1  @ 2
main: line 2: sh: bad math:  a[66]=2  @ 2
main: line 3: sh: bad math:  a[99]=2  @ 2
brush59 Slice of sparse array with [@]

[brush stdout] Expected "['1', '2']\n", got '[]\n'

stdout:
[]
stderr:
dash60 Using an array itself as the index on LHS

[dash stdout] Expected "['42', '99', '42', '99', '']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: shopt: not found
dash: 2: a[a]=42: not found
dash: 3: a[a]=99: not found
dash: 4: Bad substitution
ash60 Using an array itself as the index on LHS

[ash stdout] Expected "['42', '99', '42', '99', '']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: shopt: not found
ash: a[a]=42: not found
ash: a[a]=99: not found
ash: syntax error: bad substitution
zsh60 Using an array itself as the index on LHS

[zsh stdout] Expected "['42', '99', '42', '99', '']\n", got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: command not found: shopt
zsh: a: assignment to invalid subscript range
toysh60 Using an array itself as the index on LHS

[toysh stdout] Expected "['42', '99', '42', '99', '']\n", got "['', '', '', '']\n"

stdout:
['', '', '', '']
stderr:
sh: shopt: No such file or directory
sh: a[a]=42: No such file or directory
sh: a[a]=99: No such file or directory
dash61 Using an array itself as the index on RHS

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

stdout:
stderr: 
dash: 1: shopt: not found
dash: 2: Syntax error: "(" unexpected
ash61 Using an array itself as the index on RHS

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

stdout:
stderr: 
ash: shopt: not found
ash: syntax error: unexpected "("
zsh61 Using an array itself as the index on RHS

[zsh stdout] Expected '2\n', got '\n'

stdout:
stderr: 
zsh: command not found: shopt
zsh: bad math expression: operator expected at `2 3'
toysh61 Using an array itself as the index on RHS

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

stdout:
stderr: 
sh: shopt: No such file or directory
main: line 2: sh: syntax error: 1
dash62 a[$x$y] on LHS and RHS

[dash stdout] Expected 'foo\n1\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 3: a[12]=foo: not found
dash: 6: Bad substitution
ash62 a[$x$y] on LHS and RHS

[ash stdout] Expected 'foo\n1\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: a[12]=foo: not found
ash: syntax error: bad substitution
zsh62 a[$x$y] on LHS and RHS

[zsh stdout] Expected 'foo\n1\n', got 'foo\n12\n'

stdout:
foo
12
stderr:
toysh62 a[$x$y] on LHS and RHS

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

stdout:
stderr: 
sh: a[12]=foo: No such file or directory
main: line 7: sh: a: [@]}
dash63 Dynamic parsing of LHS a[$code]=value

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: array[x=1]=one: not found
dash: 5: array[y=2]=two: not found
dash: 7: Bad substitution
ash63 Dynamic parsing of LHS a[$code]=value

[ash stdout] Expected "['one', 'two']\nx=1\ny=2\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: declare: not found
ash: array[x=1]=one: not found
ash: array[y=2]=two: not found
ash: syntax error: bad substitution
toysh63 Dynamic parsing of LHS a[$code]=value

[toysh stdout] Expected "['one', 'two']\nx=1\ny=2\n", got "['']\nx=\ny=\n"

stdout:
['']
x=
y=
stderr:
sh: array[x=1]=one: No such file or directory
sh: array[y=2]=two: No such file or directory
dash64 Dynamic parsing of RHS ${a[$code]}

[dash stdout] Expected 'three\nthree\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: Syntax error: "(" unexpected
ash64 Dynamic parsing of RHS ${a[$code]}

[ash stdout] Expected 'three\nthree\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: declare: not found
ash: syntax error: unexpected "("
zsh64 Dynamic parsing of RHS ${a[$code]}

stdout:
two
two
stderr:
toysh64 Dynamic parsing of RHS ${a[$code]}

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

stdout:
stderr: 
main: line 2: sh: syntax error: zero
dash65 Is element set? test -v a[i]

[dash stdout] Expected 'set=0\nempty=0\nunset=1\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash65 Is element set? test -v a[i]

[ash stdout] Expected 'set=0\nempty=0\nunset=1\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh65 Is element set? test -v a[i]

[zsh stdout] Expected 'set=0\nempty=0\nunset=1\n', got 'set=2\nempty=2\nunset=2\n'

stdout:
set=2
empty=2
unset=2
stderr:
test: unknown condition: -v
test: unknown condition: -v
test: unknown condition: -v
mksh65 Is element set? test -v a[i]

stdout:
set=2
empty=2
unset=2
stderr:
mksh: <stdin>[3]: test: array[1]: unexpected operator/operand
mksh: <stdin>[6]: test: array[3]: unexpected operator/operand
mksh: <stdin>[9]: test: array[4]: unexpected operator/operand
toysh65 Is element set? test -v a[i]

[toysh stdout] Expected 'set=0\nempty=0\nunset=1\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: 1
sush65 Is element set? test -v a[i]

[sush stdout] Expected 'set=0\nempty=0\nunset=1\n', got 'set=2\nempty=2\nunset=2\n'

stdout:
set=2
empty=2
unset=2
stderr:
test: ‘-v’: unary operator expected
test: ‘-v’: unary operator expected
test: ‘-v’: unary operator expected
brush65 Is element set? test -v a[i]

[brush stdout] Expected 'set=0\nempty=0\nunset=1\n', got 'set=1\nempty=1\nunset=1\n'

stdout:
set=1
empty=1
unset=1
stderr:
dash66 [[ -v a[i] ]]

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

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash66 [[ -v a[i] ]]

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

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh66 [[ -v a[i] ]]

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

stdout:
stderr: 
zsh: unknown condition: -v
mksh66 [[ -v a[i] ]]

stdout:
stderr: 
mksh: <stdin>[2]: syntax error: 'array[1]' unexpected operator/operand
toysh66 [[ -v a[i] ]]

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
sush66 [[ -v a[i] ]]

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

stdout:
status=1
status=1
stderr:
brush66 [[ -v a[i] ]]

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

stdout:
status=1
status=1
stderr:
dash67 test -v a[i] with arith expressions

[dash stdout] Expected 'status=0\nstatus=1\n\ndbracket\nstatus=0\nstatus=1\n' Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash67 test -v a[i] with arith expressions

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

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh67 test -v a[i] with arith expressions

[zsh stdout] Expected 'status=0\nstatus=1\n\ndbracket\nstatus=0\nstatus=1\n' Got 'status=2\nstatus=2\n\ndbracket\n'
[zsh status] Expected 0, got 2

stdout:
status=2
status=2

dbracket
stderr:
test: unknown condition: -v
test: unknown condition: -v
zsh: unknown condition: -v
mksh67 test -v a[i] with arith expressions

stdout:
status=2
status=2

dbracket
stderr:
mksh: <stdin>[3]: test: array[1+1]: unexpected operator/operand
mksh: <stdin>[6]: test: array[4+1]: unexpected operator/operand
mksh: <stdin>[12]: syntax error: 'array[1+1]' unexpected operator/operand
toysh67 test -v a[i] with arith expressions

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

stdout:
stderr: 
main: line 1: sh: syntax error: 1
sush67 test -v a[i] with arith expressions

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

stdout:
status=2
status=2

dbracket
status=1
status=1
stderr:
test: ‘-v’: unary operator expected
test: ‘-v’: unary operator expected
brush67 test -v a[i] with arith expressions

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

stdout:
status=1
status=1

dbracket
status=1
status=1
stderr:
osh67 test -v a[i] with arith expressions

[osh stdout] Expected 'status=0\nstatus=1\n\ndbracket\nstatus=0\nstatus=1\n' Got 'status=1\nstatus=1\n\ndbracket\nstatus=1\nstatus=1\n'

stdout:
status=1
status=1

dbracket
status=1
status=1
stderr:
dash68 More arith expressions in [[ -v array[expr]] ]]

[dash stdout] Expected 'zero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n' Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: typeset: not found
dash: 2: Syntax error: "(" unexpected
ash68 More arith expressions in [[ -v array[expr]] ]]

[ash stdout] Expected 'zero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n' Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: typeset: not found
ash: syntax error: unexpected "("
zsh68 More arith expressions in [[ -v array[expr]] ]]

[zsh stdout] Expected 'zero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n' Got ''
[zsh status] Expected 0, got 2

stdout:
stderr: 
zsh: unknown condition: -v
mksh68 More arith expressions in [[ -v array[expr]] ]]

stdout:
stderr: 
mksh: <stdin>[6]: syntax error: 'array[zero+0]' unexpected operator/operand
toysh68 More arith expressions in [[ -v array[expr]] ]]

[toysh stdout] Expected 'zero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
sh: typeset: No such file or directory
main: line 2: sh: syntax error: ''
sush68 More arith expressions in [[ -v array[expr]] ]]

[sush stdout] Expected 'zero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n' Got 'zero=1\none=1\ntwo=1\n---\nzero=1\none=1\ntwo=1\n---\nzero=1\none=1\ntwo=1\n'

stdout:
zero=1
one=1
two=1
---
zero=1
one=1
two=1
---
zero=1
one=1
two=1
stderr:
brush68 More arith expressions in [[ -v array[expr]] ]]

[brush stdout] Expected 'zero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n' Got 'zero=1\none=1\ntwo=1\n---\nzero=1\none=1\ntwo=1\n---\nzero=1\none=1\ntwo=1\n'

stdout:
zero=1
one=1
two=1
---
zero=1
one=1
two=1
---
zero=1
one=1
two=1
stderr:
osh68 More arith expressions in [[ -v array[expr]] ]]

[osh stdout] Expected 'zero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n' Got 'zero=1\none=1\ntwo=1\n---\nzero=1\none=1\ntwo=1\n---\nzero=1\none=1\ntwo=1\n'

stdout:
zero=1
one=1
two=1
---
zero=1
one=1
two=1
---
zero=1
one=1
two=1
stderr:
bash69 Regression: Assigning with out-of-range negative index

stdout:
stderr: 
bash: line 2: a[-1]: bad array subscript
dash69 Regression: Assigning with out-of-range negative index

[dash stderr] Expected ' a[-1]=1\n ^~\n[ stdin ]:2: fatal: Index -1 is out of bounds for array of length 0\n' Got 'dash: 1: Syntax error: "(" unexpected\n'
[dash status] Expected 1, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash69 Regression: Assigning with out-of-range negative index

[ash stderr] Expected ' a[-1]=1\n ^~\n[ stdin ]:2: fatal: Index -1 is out of bounds for array of length 0\n' Got 'ash: syntax error: unexpected "("\n'
[ash status] Expected 1, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh69 Regression: Assigning with out-of-range negative index

[zsh stderr] Expected ' a[-1]=1\n ^~\n[ stdin ]:2: fatal: Index -1 is out of bounds for array of length 0\n' Got ''
[zsh status] Expected 1, got 0

stdout:
stderr: 
mksh69 Regression: Assigning with out-of-range negative index

stdout:
stderr: 
ksh69 Regression: Assigning with out-of-range negative index

[ksh stderr] Expected ' a[-1]=1\n ^~\n[ stdin ]:2: fatal: Index -1 is out of bounds for array of length 0\n' Got ''
[ksh status] Expected 1, got 0

stdout:
stderr: 
toysh69 Regression: Assigning with out-of-range negative index

[toysh stderr] Expected ' a[-1]=1\n ^~\n[ stdin ]:2: fatal: Index -1 is out of bounds for array of length 0\n' Got 'main: line 1: sh: syntax error: a[-1]=1\n'
[toysh status] Expected 1, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: a[-1]=1
sush69 Regression: Assigning with out-of-range negative index

[sush stderr] Expected ' a[-1]=1\n ^~\n[ stdin ]:2: fatal: Index -1 is out of bounds for array of length 0\n' Got ''
[sush status] Expected 1, got 0

stdout:
stderr: 
brush69 Regression: Assigning with out-of-range negative index

[brush stderr] Expected ' a[-1]=1\n ^~\n[ stdin ]:2: fatal: Index -1 is out of bounds for array of length 0\n' Got ''
[brush status] Expected 1, got 0

stdout:
stderr: 
dash70 Regression: Negative index in [[ -v a[index] ]]

[dash stdout] Expected 'a has -1\na has -6\na has -11\n', got ''
[dash status] Expected 0, got 127

stdout:
stderr: 
dash: 1: a[0]=x: not found
dash: 2: a[5]=y: not found
dash: 3: a[10]=z: not found
dash: 4: [[: not found
dash: 5: [[: not found
dash: 6: [[: not found
dash: 7: [[: not found
dash: 8: [[: not found
dash: 9: [[: not found
ash70 Regression: Negative index in [[ -v a[index] ]]

[ash stdout] Expected 'a has -1\na has -6\na has -11\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: a[0]=x: not found
ash: a[5]=y: not found
ash: a[10]=z: not found
ash: a[-1]: unknown operand
ash: a[-2]: unknown operand
ash: a[-5]: unknown operand
ash: a[-6]: unknown operand
ash: a[-10]: unknown operand
ash: a[-11]: unknown operand
zsh70 Regression: Negative index in [[ -v a[index] ]]

[zsh stdout] Expected 'a has -1\na has -6\na has -11\n', got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: a: assignment to invalid subscript range
mksh70 Regression: Negative index in [[ -v a[index] ]]

stdout:
stderr: 
mksh: <stdin>[4]: syntax error: 'a[-1]' unexpected operator/operand
ksh70 Regression: Negative index in [[ -v a[index] ]]

[ksh stdout] Expected 'a has -1\na has -6\na has -11\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
toysh70 Regression: Negative index in [[ -v a[index] ]]

[toysh stdout] Expected 'a has -1\na has -6\na has -11\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
sh: a[0]=x: No such file or directory
sh: a[5]=y: No such file or directory
sh: a[10]=z: No such file or directory
[[: too many arguments
[[: too many arguments
[[: too many arguments
[[: too many arguments
[[: too many arguments
[[: too many arguments
sush70 Regression: Negative index in [[ -v a[index] ]]

[sush stdout] Expected 'a has -1\na has -6\na has -11\n', got ''
[sush status] Expected 0, got 1

stdout:
stderr: 
brush70 Regression: Negative index in [[ -v a[index] ]]

[brush stdout] Expected 'a has -1\na has -6\na has -11\n', got ''

stdout:
stderr: 
bash71 Regression: Negative out-of-range index in [[ -v a[index] ]]

stdout:
stderr: 
bash: line 2: e: bad array subscript
dash71 Regression: Negative out-of-range index in [[ -v a[index] ]]

[dash stderr] Expected " [[ -v e[-1] ]] && echo 'e has -1'\n ^\n[ stdin ]:2: fatal: -v got index -1, which is out of bounds for array of length 0\n" Got 'dash: 1: Syntax error: "(" unexpected\n'
[dash status] Expected 1, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash71 Regression: Negative out-of-range index in [[ -v a[index] ]]

[ash stderr] Expected " [[ -v e[-1] ]] && echo 'e has -1'\n ^\n[ stdin ]:2: fatal: -v got index -1, which is out of bounds for array of length 0\n" Got 'ash: syntax error: unexpected "("\n'
[ash status] Expected 1, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh71 Regression: Negative out-of-range index in [[ -v a[index] ]]

[zsh stderr] Expected " [[ -v e[-1] ]] && echo 'e has -1'\n ^\n[ stdin ]:2: fatal: -v got index -1, which is out of bounds for array of length 0\n" Got 'zsh: unknown condition: -v\n'
[zsh status] Expected 1, got 2

stdout:
stderr: 
zsh: unknown condition: -v
mksh71 Regression: Negative out-of-range index in [[ -v a[index] ]]

stdout:
stderr: 
mksh: <stdin>[2]: syntax error: 'e[-1]' unexpected operator/operand
ksh71 Regression: Negative out-of-range index in [[ -v a[index] ]]

[ksh stderr] Expected " [[ -v e[-1] ]] && echo 'e has -1'\n ^\n[ stdin ]:2: fatal: -v got index -1, which is out of bounds for array of length 0\n" Got ''

stdout:
stderr: 
sush71 Regression: Negative out-of-range index in [[ -v a[index] ]]

[sush stderr] Expected " [[ -v e[-1] ]] && echo 'e has -1'\n ^\n[ stdin ]:2: fatal: -v got index -1, which is out of bounds for array of length 0\n" Got ''

stdout:
stderr: 
brush71 Regression: Negative out-of-range index in [[ -v a[index] ]]

[brush stderr] Expected " [[ -v e[-1] ]] && echo 'e has -1'\n ^\n[ stdin ]:2: fatal: -v got index -1, which is out of bounds for array of length 0\n" Got ''
[brush status] Expected 1, got 0

stdout:
stderr: 
bash72 a+=() modifies existing instance of BashArray

stdout:
stderr: 
dash72 a+=() modifies existing instance of BashArray

[dash stdout] Expected 'a=(1 2 3 4 5)\nb=(1 2 3 4 5)\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 3: Syntax error: "(" unexpected
ash72 a+=() modifies existing instance of BashArray

[ash stdout] Expected 'a=(1 2 3 4 5)\nb=(1 2 3 4 5)\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh72 a+=() modifies existing instance of BashArray

[zsh stdout] Expected 'a=(1 2 3 4 5)\nb=(1 2 3 4 5)\n', got 'a=(1 2 3 4 5)\nb=()\n'

stdout:
a=(1 2 3 4 5)
b=()
stderr:
zsh: command not found: var
mksh72 a+=() modifies existing instance of BashArray

stdout:
stderr: 
ksh72 a+=() modifies existing instance of BashArray

[ksh stdout] Expected 'a=(1 2 3 4 5)\nb=(1 2 3 4 5)\n', got 'a=(1 2 3 4 5)\nb=()\n'

stdout:
a=(1 2 3 4 5)
b=()
stderr:
E: ksh: <stdin>[4]: var: inaccessible or not found
toysh72 a+=() modifies existing instance of BashArray

[toysh stdout] Expected 'a=(1 2 3 4 5)\nb=(1 2 3 4 5)\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush72 a+=() modifies existing instance of BashArray

[sush stdout] Expected 'a=(1 2 3 4 5)\nb=(1 2 3 4 5)\n', got 'a=(1 2 3 4 5)\nb=()\n'

stdout:
a=(1 2 3 4 5)
b=()
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: var: command not found
brush72 a+=() modifies existing instance of BashArray

[brush stdout] Expected 'a=(1 2 3 4 5)\nb=(1 2 3 4 5)\n', got 'a=(1 2 3 4 5)\nb=()\n'

stdout:
a=(1 2 3 4 5)
b=()
stderr:
var: command not found
bash73 Regression: unset a[-2]: out-of-bound negative index should cause error

stdout:
stderr: 
bash: line 4: unset: [-2]: bad array subscript
dash73 Regression: unset a[-2]: out-of-bound negative index should cause error

[dash stderr] Expected " unset -v 'a[-2]'\n ^\n[ stdin ]:4: a[-2]: Index is out of bounds for array of length 1\n" Got 'dash: 3: Syntax error: "(" unexpected\n'
[dash status] Expected 1, got 2

stdout:
stderr: 
dash: 3: Syntax error: "(" unexpected
ash73 Regression: unset a[-2]: out-of-bound negative index should cause error

[ash stderr] Expected " unset -v 'a[-2]'\n ^\n[ stdin ]:4: a[-2]: Index is out of bounds for array of length 1\n" Got 'ash: syntax error: unexpected "("\n'
[ash status] Expected 1, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh73 Regression: unset a[-2]: out-of-bound negative index should cause error

[zsh stderr] Expected " unset -v 'a[-2]'\n ^\n[ stdin ]:4: a[-2]: Index is out of bounds for array of length 1\n" Got ''
[zsh status] Expected 1, got 0

stdout:
stderr: 
mksh73 Regression: unset a[-2]: out-of-bound negative index should cause error

stdout:
stderr: 
ksh73 Regression: unset a[-2]: out-of-bound negative index should cause error

[ksh stderr] Expected " unset -v 'a[-2]'\n ^\n[ stdin ]:4: a[-2]: Index is out of bounds for array of length 1\n" Got ''
[ksh status] Expected 1, got 0

stdout:
stderr: 
toysh73 Regression: unset a[-2]: out-of-bound negative index should cause error

[toysh stderr] Expected " unset -v 'a[-2]'\n ^\n[ stdin ]:4: a[-2]: Index is out of bounds for array of length 1\n" Got 'munmap_chunk(): invalid pointer\n'
[toysh status] Expected 1, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush73 Regression: unset a[-2]: out-of-bound negative index should cause error

[sush stderr] Expected " unset -v 'a[-2]'\n ^\n[ stdin ]:4: a[-2]: Index is out of bounds for array of length 1\n" Got ''
[sush status] Expected 1, got 0

stdout:
stderr: 
brush73 Regression: unset a[-2]: out-of-bound negative index should cause error

[brush stderr] Expected " unset -v 'a[-2]'\n ^\n[ stdin ]:4: a[-2]: Index is out of bounds for array of length 1\n" Got ''
[brush status] Expected 1, got 0

stdout:
stderr: 
dash74 Regression: Out-of-bound negative offset for ${a[@]:offset}

[dash stdout] Expected 'a=(1 2 3 4)\nbegin=-1 -> (4)\nbegin=-2 -> (3 4)\nbegin=-3 -> (2 3 4)\nbegin=-4 -> (1 2 3 4)\nbegin=-5 -> ()\n' Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 3: Syntax error: "(" unexpected
ash74 Regression: Out-of-bound negative offset for ${a[@]:offset}

[ash stdout] Expected 'a=(1 2 3 4)\nbegin=-1 -> (4)\nbegin=-2 -> (3 4)\nbegin=-3 -> (2 3 4)\nbegin=-4 -> (1 2 3 4)\nbegin=-5 -> ()\n' Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh74 Regression: Out-of-bound negative offset for ${a[@]:offset}

[zsh stdout] Expected 'a=(1 2 3 4)\nbegin=-1 -> (4)\nbegin=-2 -> (3 4)\nbegin=-3 -> (2 3 4)\nbegin=-4 -> (1 2 3 4)\nbegin=-5 -> ()\n' Got 'a=(1 2 3 4)\nbegin=-1 -> (4)\nbegin=-2 -> ( 4)\nbegin=-3 -> (3 4)\nbegin=-4 -> ( 3 4)\nbegin=-5 -> (2 3 4)\n'

stdout:
a=(1 2 3 4)
begin=-1 -> (4)
begin=-2 -> ( 4)
begin=-3 -> (3 4)
begin=-4 -> ( 3 4)
begin=-5 -> (2 3 4)
stderr:
mksh74 Regression: Out-of-bound negative offset for ${a[@]:offset}

stdout:
stderr: 
ksh74 Regression: Out-of-bound negative offset for ${a[@]:offset}

[ksh stdout] Expected 'a=(1 2 3 4)\nbegin=-1 -> (4)\nbegin=-2 -> (3 4)\nbegin=-3 -> (2 3 4)\nbegin=-4 -> (1 2 3 4)\nbegin=-5 -> ()\n' Got 'a=(1 2 3 4)\n'
[ksh status] Expected 0, got 1

stdout:
a=(1 2 3 4)
stderr:
E: ksh: <stdin>[5]: ${a[*]: -1}: bad substitution
toysh74 Regression: Out-of-bound negative offset for ${a[@]:offset}

[toysh stdout] Expected 'a=(1 2 3 4)\nbegin=-1 -> (4)\nbegin=-2 -> (3 4)\nbegin=-3 -> (2 3 4)\nbegin=-4 -> (1 2 3 4)\nbegin=-5 -> ()\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
dash75 Regression: Array length after unset

[dash stdout] Expected 'len 2;\nlen 1;\nlast x;\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 3: Syntax error: "(" unexpected
ash75 Regression: Array length after unset

[ash stdout] Expected 'len 2;\nlen 1;\nlast x;\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh75 Regression: Array length after unset

[zsh stdout] Expected 'len 2;\nlen 1;\nlast x;\n', got 'len 9;\nlen 9;\nlast ;\n'

stdout:
len 9;
len 9;
last ;
stderr:
mksh75 Regression: Array length after unset

stdout:
stderr: 
ksh75 Regression: Array length after unset

[ksh stdout] Expected 'len 2;\nlen 1;\nlast x;\n', got 'len 2;\nlen 2;\n'
[ksh status] Expected 0, got 1

stdout:
len 2;
len 2;
stderr:
E: ksh: <stdin>[9]: ${a[@]: -1}: bad substitution
toysh75 Regression: Array length after unset

[toysh stdout] Expected 'len 2;\nlen 1;\nlast x;\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush75 Regression: Array length after unset

[sush stdout] Expected 'len 2;\nlen 1;\nlast x;\n', got 'len 2;\nlen 2;\nlast y;\n'

stdout:
len 2;
len 2;
last y;
stderr:
brush75 Regression: Array length after unset

[brush stdout] Expected 'len 2;\nlen 1;\nlast x;\n', got 'len 2;\nlen 1;\nlast y;\n'

stdout:
len 2;
len 1;
last y;
stderr:
bash76 Regression: ${a[@]@Q} crash with `a[0]=x a[2]=y`

stdout:
quoted = ('x' 'y')
stderr:
dash76 Regression: ${a[@]@Q} crash with `a[0]=x a[2]=y`

[dash stdout] Expected 'quoted = (x y)\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 3: a[0]=x: not found
dash: 4: a[2]=y: not found
dash: 5: Bad substitution
ash76 Regression: ${a[@]@Q} crash with `a[0]=x a[2]=y`

[ash stdout] Expected 'quoted = (x y)\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: a[0]=x: not found
ash: a[2]=y: not found
ash: syntax error: bad substitution
zsh76 Regression: ${a[@]@Q} crash with `a[0]=x a[2]=y`

[zsh stdout] Expected 'quoted = (x y)\n', got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: a: assignment to invalid subscript range
mksh76 Regression: ${a[@]@Q} crash with `a[0]=x a[2]=y`

stdout:
stderr: 
ksh76 Regression: ${a[@]@Q} crash with `a[0]=x a[2]=y`

[ksh stdout] Expected 'quoted = (x y)\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[5]: ${a[@]@Q}: bad substitution
toysh76 Regression: ${a[@]@Q} crash with `a[0]=x a[2]=y`

[toysh stdout] Expected 'quoted = (x y)\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush76 Regression: ${a[@]@Q} crash with `a[0]=x a[2]=y`

[sush stdout] Expected 'quoted = (x y)\n', got ''
[sush status] Expected 0, got 1

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: `${a[@]@Q}': bad substitution
brush76 Regression: ${a[@]@Q} crash with `a[0]=x a[2]=y`

[brush stdout] Expected 'quoted = (x y)\n', got "quoted = ('x' 'y')\n"

stdout:
quoted = ('x' 'y')
stderr:
bash77 Regression: silent out-of-bound negative index in ${a[-2]} and $((a[-2]))

stdout:
[]
0
[0]
0
stderr:
bash: line 4: a: bad array subscript
bash: line 6: a: bad array subscript
dash77 Regression: silent out-of-bound negative index in ${a[-2]} and $((a[-2]))

[dash stdout] Expected '[]\n0\n[0]\n0\n', got ''
[dash stderr] Expected ' echo "[${a[-2]}]"\n ^\n[ stdin ]:4: Index -2 out of bounds for array of length 1\n echo "[$((a[-2]))]"\n ^\n[ stdin ]:6: Index -2 out of bounds for array of length 1\n' Got 'dash: 3: Syntax error: "(" unexpected\n'
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 3: Syntax error: "(" unexpected
ash77 Regression: silent out-of-bound negative index in ${a[-2]} and $((a[-2]))

[ash stdout] Expected '[]\n0\n[0]\n0\n', got ''
[ash stderr] Expected ' echo "[${a[-2]}]"\n ^\n[ stdin ]:4: Index -2 out of bounds for array of length 1\n echo "[$((a[-2]))]"\n ^\n[ stdin ]:6: Index -2 out of bounds for array of length 1\n' Got 'ash: syntax error: unexpected "("\n'
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh77 Regression: silent out-of-bound negative index in ${a[-2]} and $((a[-2]))

[zsh stderr] Expected ' echo "[${a[-2]}]"\n ^\n[ stdin ]:4: Index -2 out of bounds for array of length 1\n echo "[$((a[-2]))]"\n ^\n[ stdin ]:6: Index -2 out of bounds for array of length 1\n' Got ''

stdout:
[]
0
[0]
0
stderr:
mksh77 Regression: silent out-of-bound negative index in ${a[-2]} and $((a[-2]))

stdout:
stderr: 
ksh77 Regression: silent out-of-bound negative index in ${a[-2]} and $((a[-2]))

[ksh stderr] Expected ' echo "[${a[-2]}]"\n ^\n[ stdin ]:4: Index -2 out of bounds for array of length 1\n echo "[$((a[-2]))]"\n ^\n[ stdin ]:6: Index -2 out of bounds for array of length 1\n' Got ''

stdout:
[]
0
[0]
0
stderr:
toysh77 Regression: silent out-of-bound negative index in ${a[-2]} and $((a[-2]))

[toysh stdout] Expected '[]\n0\n[0]\n0\n', got ''
[toysh stderr] Expected ' echo "[${a[-2]}]"\n ^\n[ stdin ]:4: Index -2 out of bounds for array of length 1\n echo "[$((a[-2]))]"\n ^\n[ stdin ]:6: Index -2 out of bounds for array of length 1\n' Got 'munmap_chunk(): invalid pointer\n'
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush77 Regression: silent out-of-bound negative index in ${a[-2]} and $((a[-2]))

[sush stderr] Expected ' echo "[${a[-2]}]"\n ^\n[ stdin ]:4: Index -2 out of bounds for array of length 1\n echo "[$((a[-2]))]"\n ^\n[ stdin ]:6: Index -2 out of bounds for array of length 1\n' Got ''

stdout:
[]
0
[0]
0
stderr:
brush77 Regression: silent out-of-bound negative index in ${a[-2]} and $((a[-2]))

[brush stdout] Expected '[]\n0\n[0]\n0\n', got '[]\n0\n1\n'
[brush stderr] Expected ' echo "[${a[-2]}]"\n ^\n[ stdin ]:4: Index -2 out of bounds for array of length 1\n echo "[$((a[-2]))]"\n ^\n[ stdin ]:6: Index -2 out of bounds for array of length 1\n' Got '\x1b[31mERROR\x1b[0m error: arithmetic evaluation error: failed to access array\n'

stdout:
[]
0
1
stderr:
ERROR error: arithmetic evaluation error: failed to access array