Results for array-assoc.test.sh

statusbashdashashzshmkshkshtoyshsushbrushosh
pass 340010770112738
ok 0000000001
N-I 0000000001
BUG 2000000000
FAIL 642423235354231152
total42424242424242424242
casebashdashashzshmkshkshtoyshsushbrushoshdescription
0pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass pass Literal syntax ([x]=y)
detailsdetailsdetailsdetailsdetailsdetailsdetails
1FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass set associative array to indexed array literal (very surprising bash behavior)
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
2FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass Can initialize assoc array with the "(key value ...)" sequence
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
3pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass pass create empty assoc array, put, then get
detailsdetailsdetailsdetailsdetailsdetailsdetails
4pass FAIL FAIL FAIL FAIL FAIL FAIL pass pass pass Empty value (doesn't use EmptyWord?)
detailsdetailsdetailsdetailsdetailsdetails
5pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass pass retrieve keys with !
detailsdetailsdetailsdetailsdetailsdetailsdetails
6pass FAIL FAIL pass FAIL FAIL FAIL FAIL pass pass retrieve values with ${A[@]}
detailsdetailsdetailsdetailsdetailsdetails
7pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass pass coerce to string with ${A[*]}, etc.
detailsdetailsdetailsdetailsdetailsdetailsdetails
8pass FAIL FAIL pass FAIL FAIL FAIL FAIL pass pass ${A[@]/b/B}
detailsdetailsdetailsdetailsdetailsdetails
9pass FAIL FAIL pass FAIL FAIL FAIL FAIL pass pass ${A[@]#prefix}
detailsdetailsdetailsdetailsdetailsdetails
10pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass pass ${assoc} is like ${assoc[0]}
detailsdetailsdetailsdetailsdetailsdetailsdetails
11pass FAIL FAIL pass FAIL FAIL FAIL pass pass pass length ${#a[@]}
detailsdetailsdetailsdetailsdetails
12pass FAIL FAIL FAIL FAIL FAIL FAIL pass pass pass lookup with ${a[0]} -- "0" is a string
detailsdetailsdetailsdetailsdetailsdetails
13pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass pass lookup with double quoted strings "mykey"
detailsdetailsdetailsdetailsdetailsdetailsdetails
14pass FAIL FAIL pass FAIL FAIL FAIL FAIL pass pass lookup with single quoted string
detailsdetailsdetailsdetailsdetailsdetails
15pass FAIL FAIL FAIL FAIL FAIL FAIL pass pass pass lookup with unquoted $key and quoted "$i$i"
detailsdetailsdetailsdetailsdetailsdetails
16BUG FAIL FAIL FAIL pass pass FAIL FAIL FAIL pass lookup by unquoted string doesn't work in OSH because it's a variable
detailsdetailsdetailsdetailsdetailsdetailsdetails
17BUG FAIL FAIL FAIL pass pass FAIL FAIL FAIL pass bash bug: "i+1" and i+1 are the same key
detailsdetailsdetailsdetailsdetailsdetailsdetails
18pass FAIL FAIL pass FAIL FAIL FAIL FAIL pass pass Array stored in associative array gets converted to string (without strict_array)
detailsdetailsdetailsdetailsdetailsdetails
19pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass Indexed array as key of associative array coerces to string (without shopt -s strict_array)
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
20pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass pass Append to associative array value A['x']+='suffix'
detailsdetailsdetailsdetailsdetailsdetailsdetails
21FAIL FAIL FAIL FAIL pass pass FAIL FAIL FAIL pass Slice of associative array doesn't make sense in bash
detailsdetailsdetailsdetailsdetailsdetailsdetails
22pass FAIL FAIL FAIL pass pass FAIL FAIL pass N-I bash variable can have an associative array part and a string part
detailsdetailsdetailsdetailsdetailsdetails
23pass FAIL FAIL pass pass pass FAIL pass pass pass Associative array expressions inside (( )) with keys that look like numbers
detailsdetailsdetails
24pass FAIL FAIL pass pass pass FAIL pass pass pass (( A[5] += 42 ))
detailsdetailsdetails
25pass FAIL FAIL pass pass pass FAIL pass pass pass (( A[5] += 42 )) with empty cell
detailsdetailsdetails
26FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass pass pass setting key to itself (from bash-bug mailing list)
detailsdetailsdetailsdetailsdetailsdetailsdetails
27pass FAIL FAIL FAIL FAIL FAIL FAIL pass pass ok readonly associative array can't be modified
detailsdetailsdetailsdetailsdetailsdetailsdetails
28pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass associative array and brace expansion
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
29pass FAIL FAIL pass FAIL FAIL FAIL FAIL pass pass declare -A A=() allowed
detailsdetailsdetailsdetailsdetailsdetails
30pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass unset -v and assoc array
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
31pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL nameref and assoc array
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
32pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass pass ${!ref} and assoc array
detailsdetailsdetailsdetailsdetailsdetailsdetails
33pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass pass printf -v and assoc array
detailsdetailsdetailsdetailsdetailsdetailsdetails
34FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass FAIL pass bash bug: (( A["$key"] = 1 )) doesn't work
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
35pass FAIL FAIL FAIL FAIL FAIL FAIL pass pass pass Implicit increment of keys
detailsdetailsdetailsdetailsdetailsdetails
36pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass test -v assoc[key]
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
37pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL test -v with dynamic parsing
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
38pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass [[ -v assoc[key] ]]
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
39pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass [[ -v assoc[key] ]] syntax errors
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
40pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass pass BashAssoc a+=()
detailsdetailsdetailsdetailsdetailsdetailsdetails
41FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass BashAssoc ${a[@]@Q}
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
134 passed, 1 OK, 1 not implemented, 2 BUG, 282 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

dash0 Literal syntax ([x]=y)

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

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: Syntax error: "(" unexpected
ash0 Literal syntax ([x]=y)

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

stdout:
stderr: 
ash: declare: not found
ash: syntax error: unexpected "("
zsh0 Literal syntax ([x]=y)

[zsh stdout] Expected 'b\nbar\nc\n', got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: no matches found: [aa]=b
mksh0 Literal syntax ([x]=y)

[mksh stdout] Expected 'b\nbar\nc\n', got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: declare: not found
mksh: <stdin>[3]: "aa": unexpected '"'
ksh0 Literal syntax ([x]=y)

[ksh stdout] Expected 'b\nbar\nc\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: declare: inaccessible or not found
W: ksh: <stdin>[3]: "aa": unexpected '"'
toysh0 Literal syntax ([x]=y)

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

stdout:
stderr: 
main: line 2: sh: syntax error: [aa]=b
sush0 Literal syntax ([x]=y)

[sush stdout] Expected 'b\nbar\nc\n', got 'b\nbar\n\n'

stdout:
b
bar

stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: 'a+1': syntax error: operand expected (error token is "'a+1'")
bash1 set associative array to indexed array literal (very surprising bash behavior)

[bash stdout] Expected 'declare -A assoc=([k1]="foo" [k2]="spam eggs" )\ndeclare -A assoc=()\n' Got 'declare -A assoc=([k1]="foo" [k2]="spam eggs" )\ndeclare -A assoc=([foo]="spam eggs" )\n'

stdout:
declare -A assoc=([k1]="foo" [k2]="spam eggs" )
declare -A assoc=([foo]="spam eggs" )
stderr:
dash1 set associative array to indexed array literal (very surprising bash behavior)

[dash stdout] Expected "declare -A assoc=(['k1']=foo ['k2']='spam eggs')\ndeclare -A assoc=(['foo']='spam eggs')\n" Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash1 set associative array to indexed array literal (very surprising bash behavior)

[ash stdout] Expected "declare -A assoc=(['k1']=foo ['k2']='spam eggs')\ndeclare -A assoc=(['foo']='spam eggs')\n" Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh1 set associative array to indexed array literal (very surprising bash behavior)

[zsh stdout] Expected "declare -A assoc=(['k1']=foo ['k2']='spam eggs')\ndeclare -A assoc=(['foo']='spam eggs')\n" Got "typeset -a assoc\nassoc=( foo 'spam eggs' )\n"

stdout:
typeset -a assoc
assoc=( foo 'spam eggs' )
stderr:
zsh: no matches found: [k1]=foo
declare: no such variable: assoc
mksh1 set associative array to indexed array literal (very surprising bash behavior)

[mksh stdout] Expected "declare -A assoc=(['k1']=foo ['k2']='spam eggs')\ndeclare -A assoc=(['foo']='spam eggs')\n" Got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh1 set associative array to indexed array literal (very surprising bash behavior)

[ksh stdout] Expected "declare -A assoc=(['k1']=foo ['k2']='spam eggs')\ndeclare -A assoc=(['foo']='spam eggs')\n" Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
toysh1 set associative array to indexed array literal (very surprising bash behavior)

[toysh stdout] Expected "declare -A assoc=(['k1']=foo ['k2']='spam eggs')\ndeclare -A assoc=(['foo']='spam eggs')\n" Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: )
sush1 set associative array to indexed array literal (very surprising bash behavior)

[sush stdout] Expected "declare -A assoc=(['k1']=foo ['k2']='spam eggs')\ndeclare -A assoc=(['foo']='spam eggs')\n" Got 'declare -a assoc=([0]="spam eggs")\ndeclare -a assoc=([0]="foo" [1]="spam eggs")\n'

stdout:
declare -a assoc=([0]="spam eggs")
declare -a assoc=([0]="foo" [1]="spam eggs")
stderr:
brush1 set associative array to indexed array literal (very surprising bash behavior)

[brush stdout] Expected "declare -A assoc=(['k1']=foo ['k2']='spam eggs')\ndeclare -A assoc=(['foo']='spam eggs')\n" Got 'declare -A assoc=([k1]="foo" [k2]="spam eggs" )\ndeclare -A assoc=([foo]="spam eggs" )\n'

stdout:
declare -A assoc=([k1]="foo" [k2]="spam eggs" )
declare -A assoc=([foo]="spam eggs" )
stderr:
bash2 Can initialize assoc array with the "(key value ...)" sequence

[bash stdout] Expected 'status=0\ndeclare -A A=()\n', got 'status=0\ndeclare -A A=([3]="" [1]="2" )\n'

stdout:
status=0
declare -A A=([3]="" [1]="2" )
stderr:
dash2 Can initialize assoc array with the "(key value ...)" sequence

[dash stdout] Expected "status=0\ndeclare -A A=(['1']=2 ['3']='')\n" Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash2 Can initialize assoc array with the "(key value ...)" sequence

[ash stdout] Expected "status=0\ndeclare -A A=(['1']=2 ['3']='')\n" Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh2 Can initialize assoc array with the "(key value ...)" sequence

[zsh stdout] Expected "status=0\ndeclare -A A=(['1']=2 ['3']='')\n" Got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: bad set of key/value pairs for associative array
mksh2 Can initialize assoc array with the "(key value ...)" sequence

[mksh stdout] Expected "status=0\ndeclare -A A=(['1']=2 ['3']='')\n" Got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh2 Can initialize assoc array with the "(key value ...)" sequence

[ksh stdout] Expected "status=0\ndeclare -A A=(['1']=2 ['3']='')\n" Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
toysh2 Can initialize assoc array with the "(key value ...)" sequence

[toysh stdout] Expected "status=0\ndeclare -A A=(['1']=2 ['3']='')\n" Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: )
sush2 Can initialize assoc array with the "(key value ...)" sequence

[sush stdout] Expected "status=0\ndeclare -A A=(['1']=2 ['3']='')\n" Got 'status=0\ndeclare -a A=([0]="1" [1]="2" [2]="3")\n'

stdout:
status=0
declare -a A=([0]="1" [1]="2" [2]="3")
stderr:
brush2 Can initialize assoc array with the "(key value ...)" sequence

[brush stdout] Expected "status=0\ndeclare -A A=(['1']=2 ['3']='')\n" Got 'status=0\ndeclare -A A=([1]="2" [3]="" )\n'

stdout:
status=0
declare -A A=([1]="2" [3]="" )
stderr:
dash3 create empty assoc array, put, then get

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

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: Bad substitution
ash3 create empty assoc array, put, then get

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

stdout:
stderr: 
ash: declare: not found
ash: syntax error: bad substitution
zsh3 create empty assoc array, put, then get

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

stdout:
[]
stderr:
zsh: bad substitution
mksh3 create empty assoc array, put, then get

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

stdout:
[]
[]
stderr:
mksh: <stdin>[1]: declare: not found
mksh: <stdin>[4]: 'foo': multi-character character constant
ksh3 create empty assoc array, put, then get

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

stdout:
[]
[]
stderr:
E: ksh: <stdin>[1]: declare: inaccessible or not found
W: ksh: <stdin>[4]: 'foo': multi-character character constant
toysh3 create empty assoc array, put, then get

[toysh stdout] Expected '[]\n[]\nbar\n', got "['']\n['']\n\n"

stdout:
['']
['']

stderr:
sh: A[foo]=bar: No such file or directory
sush3 create empty assoc array, put, then get

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

stdout:
[]
[]
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: 'foo': syntax error: operand expected (error token is "'foo'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: 'foo': syntax error: operand expected (error token is "'foo'")
dash4 Empty value (doesn't use EmptyWord?)

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

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash4 Empty value (doesn't use EmptyWord?)

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

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh4 Empty value (doesn't use EmptyWord?)

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

stdout:
stderr: 
zsh: no matches found: [k]=
zsh: bad math expression: operand expected at `"k"'
mksh4 Empty value (doesn't use EmptyWord?)

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

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh4 Empty value (doesn't use EmptyWord?)

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

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
toysh4 Empty value (doesn't use EmptyWord?)

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

stdout:
stderr: 
main: line 1: sh: syntax error: )
dash5 retrieve keys with !

[dash stdout] Expected 'a+1\nfoo\nx\n', got ''

stdout:
stderr: 
dash: 1: declare: not found
dash: 3: a[x]=b: not found
dash: 4: a[foo]=bar: not found
dash: 5: a[a+1]=c: not found
dash: 6: Bad substitution
ash5 retrieve keys with !

[ash stdout] Expected 'a+1\nfoo\nx\n', got ''

stdout:
stderr: 
ash: declare: not found
ash: a[x]=b: not found
ash: a[foo]=bar: not found
ash: a[a+1]=c: not found
ash: syntax error: bad substitution
zsh5 retrieve keys with !

[zsh stdout] Expected 'a+1\nfoo\nx\n', got ''

stdout:
stderr: 
zsh: bad substitution
mksh5 retrieve keys with !

[mksh stdout] Expected 'a+1\nfoo\nx\n', got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: declare: not found
mksh: <stdin>[3]: "x": unexpected '"'
ksh5 retrieve keys with !

[ksh stdout] Expected 'a+1\nfoo\nx\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: declare: inaccessible or not found
W: ksh: <stdin>[3]: "x": unexpected '"'
toysh5 retrieve keys with !

[toysh stdout] Expected 'a+1\nfoo\nx\n', got ''

stdout:
stderr: 
sh: a[x]=b: No such file or directory
sh: a[foo]=bar: No such file or directory
sh: a[a+1]=c: No such file or directory
sush5 retrieve keys with !

[sush stdout] Expected 'a+1\nfoo\nx\n', got 'x\n'

stdout:
x
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: 'foo': syntax error: operand expected (error token is "'foo'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: 'a+1': syntax error: operand expected (error token is "'a+1'")
dash6 retrieve values with ${A[@]}

[dash stdout] Expected 'b\nbar\nc\n', got ''

stdout:
stderr: 
dash: 1: declare: not found
dash: 3: A[x]=b: not found
dash: 4: A[foo]=bar: not found
dash: 5: A[a+1]=c: not found
dash: 6: Bad substitution
ash6 retrieve values with ${A[@]}

[ash stdout] Expected 'b\nbar\nc\n', got ''

stdout:
stderr: 
ash: declare: not found
ash: A[x]=b: not found
ash: A[foo]=bar: not found
ash: A[a+1]=c: not found
ash: syntax error: bad substitution
mksh6 retrieve values with ${A[@]}

[mksh stdout] Expected 'b\nbar\nc\n', got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: declare: not found
mksh: <stdin>[3]: "x": unexpected '"'
ksh6 retrieve values with ${A[@]}

[ksh stdout] Expected 'b\nbar\nc\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: declare: inaccessible or not found
W: ksh: <stdin>[3]: "x": unexpected '"'
toysh6 retrieve values with ${A[@]}

[toysh stdout] Expected 'b\nbar\nc\n', got ''

stdout:
stderr: 
sh: A[x]=b: No such file or directory
sh: A[foo]=bar: No such file or directory
sh: A[a+1]=c: No such file or directory
sush6 retrieve values with ${A[@]}

[sush stdout] Expected 'b\nbar\nc\n', got 'b\n'

stdout:
b
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: 'foo': syntax error: operand expected (error token is "'foo'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: 'a+1': syntax error: operand expected (error token is "'a+1'")
dash7 coerce to string with ${A[*]}, etc.

[dash stdout] Expected "['xx yy']\n['X X Y Y']\n['xx', 'yy']\n['X', 'X', 'Y', 'Y']\n" Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: A[X X]=xx: not found
dash: 3: A[Y Y]=yy: not found
dash: 4: Bad substitution
ash7 coerce to string with ${A[*]}, etc.

[ash stdout] Expected "['xx yy']\n['X X Y Y']\n['xx', 'yy']\n['X', 'X', 'Y', 'Y']\n" Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: declare: not found
ash: A[X X]=xx: not found
ash: A[Y Y]=yy: not found
ash: syntax error: bad substitution
zsh7 coerce to string with ${A[*]}, etc.

[zsh stdout] Expected "['xx yy']\n['X X Y Y']\n['xx', 'yy']\n['X', 'X', 'Y', 'Y']\n" Got "['yy xx']\n"
[zsh status] Expected 0, got 1

stdout:
['yy xx']
stderr:
zsh: bad substitution
mksh7 coerce to string with ${A[*]}, etc.

[mksh stdout] Expected "['xx yy']\n['X X Y Y']\n['xx', 'yy']\n['X', 'X', 'Y', 'Y']\n" Got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: declare: not found
mksh: <stdin>[2]: 'X X': multi-character character constant
ksh7 coerce to string with ${A[*]}, etc.

[ksh stdout] Expected "['xx yy']\n['X X Y Y']\n['xx', 'yy']\n['X', 'X', 'Y', 'Y']\n" Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: declare: inaccessible or not found
W: ksh: <stdin>[2]: 'X X': multi-character character constant
toysh7 coerce to string with ${A[*]}, etc.

[toysh stdout] Expected "['xx yy']\n['X X Y Y']\n['xx', 'yy']\n['X', 'X', 'Y', 'Y']\n" Got "['']\n['']\n[]\n[]\n"

stdout:
['']
['']
[]
[]
stderr:
sh: A[X X]=xx: No such file or directory
sh: A[Y Y]=yy: No such file or directory
sush7 coerce to string with ${A[*]}, etc.

[sush stdout] Expected "['xx yy']\n['X X Y Y']\n['xx', 'yy']\n['X', 'X', 'Y', 'Y']\n" Got "['']\n['']\n[]\n[]\n"

stdout:
['']
['']
[]
[]
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: 'X X': syntax error: operand expected (error token is "'X X'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: 'Y Y': syntax error: operand expected (error token is "'Y Y'")
dash8 ${A[@]/b/B}

[dash stdout] Expected 'BBB\nccc\nddd\n', got ''

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: A[aa]=bbb: not found
dash: 3: A[bb]=ccc: not found
dash: 4: A[cc]=ddd: not found
dash: 5: Bad substitution
ash8 ${A[@]/b/B}

[ash stdout] Expected 'BBB\nccc\nddd\n', got ''

stdout:
stderr: 
ash: declare: not found
ash: A[aa]=bbb: not found
ash: A[bb]=ccc: not found
ash: A[cc]=ddd: not found
ash: syntax error: bad substitution
mksh8 ${A[@]/b/B}

[mksh stdout] Expected 'BBB\nccc\nddd\n', got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: declare: not found
mksh: <stdin>[2]: 'aa': multi-character character constant
ksh8 ${A[@]/b/B}

[ksh stdout] Expected 'BBB\nccc\nddd\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: declare: inaccessible or not found
W: ksh: <stdin>[2]: 'aa': multi-character character constant
toysh8 ${A[@]/b/B}

[toysh stdout] Expected 'BBB\nccc\nddd\n', got ''

stdout:
stderr: 
sh: A[aa]=bbb: No such file or directory
sh: A[bb]=ccc: No such file or directory
sh: A[cc]=ddd: No such file or directory
sush8 ${A[@]/b/B}

[sush stdout] Expected 'BBB\nccc\nddd\n', got ''

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: 'aa': syntax error: operand expected (error token is "'aa'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: 'bb': syntax error: operand expected (error token is "'bb'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: 'cc': syntax error: operand expected (error token is "'cc'")
dash9 ${A[@]#prefix}

[dash stdout] Expected 'hree\none\nwo\n', got ''

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: A[aa]=one: not found
dash: 3: A[bb]=two: not found
dash: 4: A[cc]=three: not found
dash: 5: Bad substitution
ash9 ${A[@]#prefix}

[ash stdout] Expected 'hree\none\nwo\n', got ''

stdout:
stderr: 
ash: declare: not found
ash: A[aa]=one: not found
ash: A[bb]=two: not found
ash: A[cc]=three: not found
ash: syntax error: bad substitution
mksh9 ${A[@]#prefix}

[mksh stdout] Expected 'hree\none\nwo\n', got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: declare: not found
mksh: <stdin>[2]: 'aa': multi-character character constant
ksh9 ${A[@]#prefix}

[ksh stdout] Expected 'hree\none\nwo\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: declare: inaccessible or not found
W: ksh: <stdin>[2]: 'aa': multi-character character constant
toysh9 ${A[@]#prefix}

[toysh stdout] Expected 'hree\none\nwo\n', got ''

stdout:
stderr: 
sh: A[aa]=one: No such file or directory
sh: A[bb]=two: No such file or directory
sh: A[cc]=three: No such file or directory
sush9 ${A[@]#prefix}

[sush stdout] Expected 'hree\none\nwo\n', got ''

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: 'aa': syntax error: operand expected (error token is "'aa'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: 'bb': syntax error: operand expected (error token is "'bb'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: 'cc': syntax error: operand expected (error token is "'cc'")
dash10 ${assoc} is like ${assoc[0]}

[dash stdout] Expected 'a=\na=zzz\na=yyy\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: declare: not found
dash: 3: Syntax error: "(" unexpected
ash10 ${assoc} is like ${assoc[0]}

[ash stdout] Expected 'a=\na=zzz\na=yyy\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: declare: not found
ash: syntax error: unexpected "("
zsh10 ${assoc} is like ${assoc[0]}

[zsh stdout] Expected 'a=\na=zzz\na=yyy\n', got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: no matches found: [aa]=b
mksh10 ${assoc} is like ${assoc[0]}

[mksh stdout] Expected 'a=\na=zzz\na=yyy\n', got 'a=[aa]=b\na=[0]=zzz\na=[0]=yyy\n'

stdout:
a=[aa]=b
a=[0]=zzz
a=[0]=yyy
stderr:
mksh: <stdin>[1]: declare: not found
ksh10 ${assoc} is like ${assoc[0]}

[ksh stdout] Expected 'a=\na=zzz\na=yyy\n', got 'a=[aa]=b\na=[0]=zzz\na=[0]=yyy\n'

stdout:
a=[aa]=b
a=[0]=zzz
a=[0]=yyy
stderr:
E: ksh: <stdin>[1]: declare: inaccessible or not found
toysh10 ${assoc} is like ${assoc[0]}

[toysh stdout] Expected 'a=\na=zzz\na=yyy\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 3: sh: syntax error: [aa]=b
sush10 ${assoc} is like ${assoc[0]}

[sush stdout] Expected 'a=\na=zzz\na=yyy\n', got 'a=bar\na=zzz\na=\n'

stdout:
a=bar
a=zzz
a=
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: 'a+1': syntax error: operand expected (error token is "'a+1'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: '0': syntax error: operand expected (error token is "'0'")
dash11 length ${#a[@]}

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

stdout:
0
stderr:
dash: 1: declare: not found
dash: 2: a[x]=1: not found
dash: 3: a[y]=2: not found
dash: 4: a[z]=3: not found
ash11 length ${#a[@]}

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

stdout:
stderr: 
ash: declare: not found
ash: a[x]=1: not found
ash: a[y]=2: not found
ash: a[z]=3: not found
ash: syntax error: bad substitution
mksh11 length ${#a[@]}

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

stdout:
stderr: 
mksh: <stdin>[1]: declare: not found
mksh: <stdin>[2]: "x": unexpected '"'
ksh11 length ${#a[@]}

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

stdout:
stderr: 
E: ksh: <stdin>[1]: declare: inaccessible or not found
W: ksh: <stdin>[2]: "x": unexpected '"'
toysh11 length ${#a[@]}

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

stdout:
stderr: 
sh: a[x]=1: No such file or directory
sh: a[y]=2: No such file or directory
sh: a[z]=3: No such file or directory
main: line 5: sh: a: [@]}"
dash12 lookup with ${a[0]} -- "0" is a string

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

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: a[0]=a: not found
dash: 3: a[1]=b: not found
dash: 4: a[2]=c: not found
dash: 5: Bad substitution
ash12 lookup with ${a[0]} -- "0" is a string

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

stdout:
stderr: 
ash: declare: not found
ash: a[0]=a: not found
ash: a[1]=b: not found
ash: a[2]=c: not found
ash: syntax error: bad substitution
zsh12 lookup with ${a[0]} -- "0" is a string

[zsh stdout] Expected '0 a 1 b 2 c\n', got '0 1 2 \n'

stdout:
0  1  2 
stderr:
mksh12 lookup with ${a[0]} -- "0" is a string

[mksh stdout] Expected '0 a 1 b 2 c\n', got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: declare: not found
mksh: <stdin>[2]: "0": unexpected '"'
ksh12 lookup with ${a[0]} -- "0" is a string

[ksh stdout] Expected '0 a 1 b 2 c\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: declare: inaccessible or not found
W: ksh: <stdin>[2]: "0": unexpected '"'
toysh12 lookup with ${a[0]} -- "0" is a string

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

stdout:
0  1  2 
stderr:
sh: a[0]=a: No such file or directory
sh: a[1]=b: No such file or directory
sh: a[2]=c: No such file or directory
dash13 lookup with double quoted strings "mykey"

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

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: a[aa]=b: not found
dash: 3: a[foo]=bar: not found
dash: 4: a[a+1]=c: not found
dash: 5: Bad substitution
ash13 lookup with double quoted strings "mykey"

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

stdout:
stderr: 
ash: declare: not found
ash: a[aa]=b: not found
ash: a[foo]=bar: not found
ash: a[a+1]=c: not found
ash: syntax error: bad substitution
zsh13 lookup with double quoted strings "mykey"

[zsh stdout] Expected 'b bar c\n', got 'b bar \n'

stdout:
b bar 
stderr:
mksh13 lookup with double quoted strings "mykey"

[mksh stdout] Expected 'b bar c\n', got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: declare: not found
mksh: <stdin>[2]: "aa": unexpected '"'
ksh13 lookup with double quoted strings "mykey"

[ksh stdout] Expected 'b bar c\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: declare: inaccessible or not found
W: ksh: <stdin>[2]: "aa": unexpected '"'
toysh13 lookup with double quoted strings "mykey"

[toysh stdout] Expected 'b bar c\n', got ' \n'

stdout:
  
stderr:
sh: a[aa]=b: No such file or directory
sh: a[foo]=bar: No such file or directory
sh: a[a+1]=c: No such file or directory
sush13 lookup with double quoted strings "mykey"

[sush stdout] Expected 'b bar c\n', got 'b bar \n'

stdout:
b bar 
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: 'a+1': syntax error: operand expected (error token is "'a+1'")
dash14 lookup with single quoted string

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

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: a[aa]=b: not found
dash: 3: a[foo]=bar: not found
dash: 4: a[a+1]=c: not found
dash: 5: Bad substitution
ash14 lookup with single quoted string

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

stdout:
stderr: 
ash: declare: not found
ash: a[aa]=b: not found
ash: a[foo]=bar: not found
ash: a[a+1]=c: not found
ash: syntax error: bad substitution
mksh14 lookup with single quoted string

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

stdout:
stderr: 
mksh: <stdin>[1]: declare: not found
mksh: <stdin>[2]: "aa": unexpected '"'
ksh14 lookup with single quoted string

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

stdout:
stderr: 
E: ksh: <stdin>[1]: declare: inaccessible or not found
W: ksh: <stdin>[2]: "aa": unexpected '"'
toysh14 lookup with single quoted string

[toysh stdout] Expected 'c\n', got '\n'

stdout:
stderr: 
sh: a[aa]=b: No such file or directory
sh: a[foo]=bar: No such file or directory
sh: a[a+1]=c: No such file or directory
sush14 lookup with single quoted string

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

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: 'a+1': syntax error: operand expected (error token is "'a+1'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: 'a+1': syntax error: operand expected (error token is "'a+1'")
dash15 lookup with unquoted $key and quoted "$i$i"

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

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: A[aa]=b: not found
dash: 3: A[foo]=bar: not found
dash: 6: Bad substitution
ash15 lookup with unquoted $key and quoted "$i$i"

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

stdout:
stderr: 
ash: declare: not found
ash: A[aa]=b: not found
ash: A[foo]=bar: not found
ash: syntax error: bad substitution
zsh15 lookup with unquoted $key and quoted "$i$i"

[zsh stdout] Expected 'bar\nb\n', got '\nb\n'

stdout:
b
stderr:
mksh15 lookup with unquoted $key and quoted "$i$i"

[mksh stdout] Expected 'bar\nb\n', got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: declare: not found
mksh: <stdin>[2]: "aa": unexpected '"'
ksh15 lookup with unquoted $key and quoted "$i$i"

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

stdout:
stderr: 
E: ksh: <stdin>[1]: declare: inaccessible or not found
W: ksh: <stdin>[2]: "aa": unexpected '"'
toysh15 lookup with unquoted $key and quoted "$i$i"

[toysh stdout] Expected 'bar\nb\n', got '\n\n'

stdout:

stderr:
sh: A[aa]=b: No such file or directory
sh: A[foo]=bar: No such file or directory
bash16 lookup by unquoted string doesn't work in OSH because it's a variable

stdout:
c
stderr:
dash16 lookup by unquoted string doesn't work in OSH because it's a variable

[dash status] Expected 1, got 2

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: a[aa]=b: not found
dash: 3: a[foo]=bar: not found
dash: 4: a[a+1]=c: not found
dash: 5: Bad substitution
ash16 lookup by unquoted string doesn't work in OSH because it's a variable

[ash status] Expected 1, got 2

stdout:
stderr: 
ash: declare: not found
ash: a[aa]=b: not found
ash: a[foo]=bar: not found
ash: a[a+1]=c: not found
ash: syntax error: bad substitution
zsh16 lookup by unquoted string doesn't work in OSH because it's a variable

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

stdout:
stderr: 
toysh16 lookup by unquoted string doesn't work in OSH because it's a variable

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

stdout:
stderr: 
sh: a[aa]=b: No such file or directory
sh: a[foo]=bar: No such file or directory
sh: a[a+1]=c: No such file or directory
sush16 lookup by unquoted string doesn't work in OSH because it's a variable

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

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: 'a+1': syntax error: operand expected (error token is "'a+1'")
brush16 lookup by unquoted string doesn't work in OSH because it's a variable

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

stdout:
c
stderr:
bash17 bash bug: "i+1" and i+1 are the same key

stdout:
array[i]=6
array[i+1]=7
assoc[i]=string
assoc[i+1]=string+1
assoc[i]=string
assoc[i+1]=string+1
stderr:
dash17 bash bug: "i+1" and i+1 are the same key

[dash stdout] Expected 'array[i]=6\narray[i+1]=7\n', got ''
[dash status] Expected 1, got 2

stdout:
stderr: 
dash: 2: Syntax error: "(" unexpected
ash17 bash bug: "i+1" and i+1 are the same key

[ash stdout] Expected 'array[i]=6\narray[i+1]=7\n', got ''
[ash status] Expected 1, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh17 bash bug: "i+1" and i+1 are the same key

[zsh stdout] Expected 'array[i]=6\narray[i+1]=7\n', got ''

stdout:
stderr: 
zsh: no matches found: array[i]=5
toysh17 bash bug: "i+1" and i+1 are the same key

[toysh stdout] Expected 'array[i]=6\narray[i+1]=7\n', got ''
[toysh status] Expected 1, got 2

stdout:
stderr: 
main: line 2: sh: syntax error: 5
sush17 bash bug: "i+1" and i+1 are the same key

[sush stdout] Expected 'array[i]=6\narray[i+1]=7\n', got 'array[i]=6\narray[i+1]=7\nassoc[i]=string\nassoc[i+1]=string+1\nassoc[i]=string\nassoc[i+1]=string+1\n'
[sush status] Expected 1, got 0

stdout:
array[i]=6
array[i+1]=7
assoc[i]=string
assoc[i+1]=string+1
assoc[i]=string
assoc[i+1]=string+1
stderr:
brush17 bash bug: "i+1" and i+1 are the same key

[brush stdout] Expected 'array[i]=6\narray[i+1]=7\n', got 'array[i]=6\narray[i+1]=7\nassoc[i]=string\nassoc[i+1]=string+1\nassoc[i]=string\nassoc[i+1]=string+1\n'
[brush status] Expected 1, got 0

stdout:
array[i]=6
array[i+1]=7
assoc[i]=string
assoc[i+1]=string+1
assoc[i]=string
assoc[i+1]=string+1
stderr:
dash18 Array stored in associative array gets converted to string (without strict_array)

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

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash18 Array stored in associative array gets converted to string (without strict_array)

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

stdout:
stderr: 
ash: syntax error: unexpected "("
mksh18 Array stored in associative array gets converted to string (without strict_array)

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

stdout:
stderr: 
mksh: <stdin>[2]: declare: not found
mksh: <stdin>[3]: 'key': multi-character character constant
ksh18 Array stored in associative array gets converted to string (without strict_array)

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

stdout:
stderr: 
E: ksh: <stdin>[2]: declare: inaccessible or not found
W: ksh: <stdin>[3]: 'key': multi-character character constant
toysh18 Array stored in associative array gets converted to string (without strict_array)

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

stdout:
stderr: 
main: line 1: sh: syntax error: '1 2'
sush18 Array stored in associative array gets converted to string (without strict_array)

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

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: 'key': syntax error: operand expected (error token is "'key'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: 'key': syntax error: operand expected (error token is "'key'")
dash19 Indexed array as key of associative array coerces to string (without shopt -s strict_array)

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

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash19 Indexed array as key of associative array coerces to string (without shopt -s strict_array)

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

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh19 Indexed array as key of associative array coerces to string (without shopt -s strict_array)

[zsh stdout] Expected 'foo\n1 2 3\n42\n', got 'foo\n'

stdout:
foo
stderr:
zsh: bad substitution
mksh19 Indexed array as key of associative array coerces to string (without shopt -s strict_array)

[mksh stdout] Expected 'foo\n1 2 3\n42\n', got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh19 Indexed array as key of associative array coerces to string (without shopt -s strict_array)

[ksh stdout] Expected 'foo\n1 2 3\n42\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
toysh19 Indexed array as key of associative array coerces to string (without shopt -s strict_array)

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

stdout:
stderr: 
main: line 1: sh: syntax error: )
sush19 Indexed array as key of associative array coerces to string (without shopt -s strict_array)

[sush stdout] Expected 'foo\n1 2 3\n42\n', got '\n123\n42\n'

stdout:
123
42
stderr:
brush19 Indexed array as key of associative array coerces to string (without shopt -s strict_array)

[brush stdout] Expected 'foo\n1 2 3\n42\n', got '\n42\n'

stdout:
42
stderr:
assoc[1: command not found
dash20 Append to associative array value A['x']+='suffix'

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

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: A[x]=foo: not found
dash: 3: A[x]+=bar: not found
dash: 4: A[x]+=bar: not found
dash: 5: Bad substitution
ash20 Append to associative array value A['x']+='suffix'

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

stdout:
stderr: 
ash: declare: not found
ash: A[x]=foo: not found
ash: A[x]+=bar: not found
ash: A[x]+=bar: not found
ash: syntax error: bad substitution
zsh20 Append to associative array value A['x']+='suffix'

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

stdout:
['']
stderr:
mksh20 Append to associative array value A['x']+='suffix'

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

stdout:
stderr: 
mksh: <stdin>[1]: declare: not found
mksh: <stdin>[5]: "x": unexpected '"'
ksh20 Append to associative array value A['x']+='suffix'

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

stdout:
stderr: 
E: ksh: <stdin>[1]: declare: inaccessible or not found
W: ksh: <stdin>[5]: "x": unexpected '"'
toysh20 Append to associative array value A['x']+='suffix'

[toysh stdout] Expected "['foobarbar']\n", got "['']\n"

stdout:
['']
stderr:
sh: A[x]=foo: No such file or directory
sh: A[x]+=bar: No such file or directory
sh: A[x]+=bar: No such file or directory
sush20 Append to associative array value A['x']+='suffix'

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

stdout:
['']
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: 'x': syntax error: operand expected (error token is "'x'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: 'x': syntax error: operand expected (error token is "'x'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: 'x': syntax error: operand expected (error token is "'x'")
bash21 Slice of associative array doesn't make sense in bash

[bash stdout] Expected "['2', '1', '5']\n['2', '1', '5']\n['1', '5', '4']\n['5', '4', '3']\n['4', '3']\n['3']\n" Got "['4', '1', '3']\n['4', '1', '3']\n['1', '3', '5']\n['3', '5', '2']\n['5', '2']\n['2']\n"

stdout:
['4', '1', '3']
['4', '1', '3']
['1', '3', '5']
['3', '5', '2']
['5', '2']
['2']
stderr:
dash21 Slice of associative array doesn't make sense in bash

[dash status] Expected 1, got 2

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: a[xx]=1: not found
dash: 3: a[yy]=2: not found
dash: 4: a[zz]=3: not found
dash: 5: a[aa]=4: not found
dash: 6: a[bb]=5: not found
dash: 7: Bad substitution
ash21 Slice of associative array doesn't make sense in bash

[ash status] Expected 1, got 2

stdout:
stderr: 
ash: declare: not found
ash: a[xx]=1: not found
ash: a[yy]=2: not found
ash: a[zz]=3: not found
ash: a[aa]=4: not found
ash: a[bb]=5: not found
ash: syntax error: bad substitution
zsh21 Slice of associative array doesn't make sense in bash

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

stdout:
['5', '4', '3']
['4', '3', '2']
['3', '2', '1']
['2', '1']
['1']
[]
stderr:
toysh21 Slice of associative array doesn't make sense in bash

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

stdout:
[]
[]
[]
[]
[]
[]
stderr:
sh: a[xx]=1: No such file or directory
sh: a[yy]=2: No such file or directory
sh: a[zz]=3: No such file or directory
sh: a[aa]=4: No such file or directory
sh: a[bb]=5: No such file or directory
sush21 Slice of associative array doesn't make sense in bash

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

stdout:
['4', '5', '1']
['4', '5', '1']
['4', '5', '1']
['4', '5', '1']
['4', '5', '1']
['4', '5', '1']
stderr:
brush21 Slice of associative array doesn't make sense in bash

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

stdout:
['4', '5', '1']
['5', '1', '2']
['1', '2', '3']
['2', '3']
['3']
[]
stderr:
dash22 bash variable can have an associative array part and a string part

[dash stdout] Expected '1 2\n1 2 zero\n1 2 string\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: assoc[1]=1: not found
dash: 3: assoc[2]=2: not found
dash: 4: Bad substitution
ash22 bash variable can have an associative array part and a string part

[ash stdout] Expected '1 2\n1 2 zero\n1 2 string\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: declare: not found
ash: assoc[1]=1: not found
ash: assoc[2]=2: not found
ash: syntax error: bad substitution
zsh22 bash variable can have an associative array part and a string part

[zsh stdout] Expected '1 2\n1 2 zero\n1 2 string\n', got '1 2 1 2\n1 2 zero 1 2\ns t string\n'

stdout:
1 2 1 2
1 2 zero 1 2
s t string
stderr:
toysh22 bash variable can have an associative array part and a string part

[toysh stdout] Expected '1 2\n1 2 zero\n1 2 string\n', got '\n\n'
[toysh status] Expected 0, got 1

stdout:

stderr:
sh: assoc[1]=1: No such file or directory
sh: assoc[2]=2: No such file or directory
sh: assoc[0]=zero: No such file or directory
main: line 8: sh: assoc: [1]}
sush22 bash variable can have an associative array part and a string part

[sush stdout] Expected '1 2\n1 2 zero\n1 2 string\n', got '1 2 2\n1 2 zero\n1 2 zero\n'

stdout:
1 2 2
1 2 zero
1 2 zero
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: Undefined call set_as_single
osh22 bash variable can have an associative array part and a string part

stdout:
1 2
1 2 zero
stderr:
  echo ${assoc[1]} ${assoc[2]} ${assoc}
         ^~~~~
[ stdin ]:8: fatal: Can't index string 'assoc' with integer
dash23 Associative array expressions inside (( )) with keys that look like numbers

[dash stdout] Expected '42\n42\n', got '\n\n'

stdout:

stderr:
dash: 1: declare: not found
dash: 2: assoc[0]=42: not found
dash: 3: Bad substitution
dash: 5: var: not found
ash23 Associative array expressions inside (( )) with keys that look like numbers

[ash stdout] Expected '42\n42\n', got '\n\n'

stdout:

stderr:
ash: declare: not found
ash: assoc[0]=42: not found
ash: syntax error: bad substitution
ash: var: not found
toysh23 Associative array expressions inside (( )) with keys that look like numbers

[toysh stdout] Expected '42\n42\n', got '\n\n'

stdout:

stderr:
sh: assoc[0]=42: No such file or directory
main: line 3: sh: bad math:  var =   @ 8
main: line 5: sh: =0
main: line 5: sh: bad math:  var = assoc[0]  @ 12
dash24 (( A[5] += 42 ))

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

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: A[5]: not found
dash: 3: A[5]: not found
dash: 4: Bad substitution
ash24 (( A[5] += 42 ))

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

stdout:
stderr: 
ash: declare: not found
ash: A[5]: not found
ash: A[5]: not found
ash: syntax error: bad substitution
toysh24 (( A[5] += 42 ))

[toysh stdout] Expected '16\n', got '\n'

stdout:
stderr: 
main: line 2: sh: bad math:  A[5] = 10  @ 2
main: line 3: sh: bad math:  A[5] += 6  @ 2
dash25 (( A[5] += 42 )) with empty cell

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

stdout:
stderr: 
dash: 1: shopt: not found
dash: 2: declare: not found
dash: 3: A[5]: not found
dash: 4: Bad substitution
ash25 (( A[5] += 42 )) with empty cell

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

stdout:
stderr: 
ash: shopt: not found
ash: declare: not found
ash: A[5]: not found
ash: syntax error: bad substitution
toysh25 (( A[5] += 42 )) with empty cell

[toysh stdout] Expected '6\n', got '\n'

stdout:
stderr: 
sh: shopt: No such file or directory
main: line 3: sh: bad math:  A[5] += 6  @ 2
bash26 setting key to itself (from bash-bug mailing list)

[bash stdout] Expected 'value1\nvalue2\n', got 'value1\nvalue1 value2\n'

stdout:
value1
value1 value2
stderr:
dash26 setting key to itself (from bash-bug mailing list)

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

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: Syntax error: "(" unexpected
ash26 setting key to itself (from bash-bug mailing list)

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

stdout:
stderr: 
ash: declare: not found
ash: syntax error: unexpected "("
zsh26 setting key to itself (from bash-bug mailing list)

[zsh stdout] Expected 'value1\nvalue1 value2\n', got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: no matches found: [key]=value1
mksh26 setting key to itself (from bash-bug mailing list)

[mksh stdout] Expected 'value1\nvalue1 value2\n', got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: declare: not found
mksh: <stdin>[3]: "key": unexpected '"'
ksh26 setting key to itself (from bash-bug mailing list)

[ksh stdout] Expected 'value1\nvalue1 value2\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: declare: inaccessible or not found
W: ksh: <stdin>[3]: "key": unexpected '"'
toysh26 setting key to itself (from bash-bug mailing list)

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

stdout:
stderr: 
main: line 2: sh: syntax error: ["key"]="value1"
dash27 readonly associative array can't be modified

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

stdout:
status=127
stderr:
dash: 1: declare: not found
dash: 2: A[x]=1: not found
ash27 readonly associative array can't be modified

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

stdout:
status=127
stderr:
ash: declare: not found
ash: A[x]=1: not found
zsh27 readonly associative array can't be modified

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

stdout:
stderr: 
zsh: read-only variable: A
mksh27 readonly associative array can't be modified

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

stdout:
status=0
stderr:
mksh: <stdin>[1]: declare: not found
ksh27 readonly associative array can't be modified

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

stdout:
status=0
stderr:
E: ksh: <stdin>[1]: declare: inaccessible or not found
toysh27 readonly associative array can't be modified

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

stdout:
status=127
stderr:
sh: A[x]=1: No such file or directory
osh27 readonly associative array can't be modified

stdout:
stderr: 
  A['x']=1
  ^~
[ stdin ]:2: fatal: Can't assign to readonly associative array
dash28 associative array and brace expansion

[dash stdout] Expected 'v\n-{a,b}-\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash28 associative array and brace expansion

[ash stdout] Expected 'v\n-{a,b}-\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh28 associative array and brace expansion

[zsh stdout] Expected 'v\n-{a,b}-\n', got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: no matches found: [k1]=v
zsh: bad math expression: operand expected at `"k1"'
mksh28 associative array and brace expansion

[mksh stdout] Expected 'v\n-{a,b}-\n', got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh28 associative array and brace expansion

[ksh stdout] Expected 'v\n-{a,b}-\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
toysh28 associative array and brace expansion

[toysh stdout] Expected 'v\n-{a,b}-\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: )
sush28 associative array and brace expansion

[sush stdout] Expected 'v\n-{a,b}-\n', got '-b-\n-b-\n'

stdout:
-b-
-b-
stderr:
brush28 associative array and brace expansion

[brush stdout] Expected 'v\n-{a,b}-\n', got 'v\n-a- -b-\n'

stdout:
v
-a- -b-
stderr:
dash29 declare -A A=() allowed

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

stdout:
stderr: 
dash: 2: shopt: not found
dash: 4: Syntax error: "(" unexpected
ash29 declare -A A=() allowed

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

stdout:
stderr: 
ash: shopt: not found
ash: syntax error: unexpected "("
mksh29 declare -A A=() allowed

[mksh stdout] Expected 'len=0\nlen=1\nunset len=0\n', got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[2]: shopt: not found
mksh: <stdin>[4]: syntax error: '(' unexpected
ksh29 declare -A A=() allowed

[ksh stdout] Expected 'len=0\nlen=1\nunset len=0\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[2]: shopt: inaccessible or not found
E: ksh: <stdin>[4]: syntax error: unexpected '('
toysh29 declare -A A=() allowed

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

stdout:
stderr: 
set: bad -o nounset
sh: shopt: No such file or directory
main: line 4: sh: syntax error: )
sush29 declare -A A=() allowed

[sush stdout] Expected 'len=0\nlen=1\nunset len=0\n', got 'len=0\nlen=0\nunset len=0\n'

stdout:
len=0
len=0
unset len=0
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: nounset: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: shopt: strict_arith: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: 'k': syntax error: operand expected (error token is "'k'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 10: set: nounset: invalid option name
dash30 unset -v and assoc array

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

stdout:
stderr: 
dash: 1: shopt: not found
dash: 3: Syntax error: Bad function name
ash30 unset -v and assoc array

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

stdout:
stderr: 
ash: shopt: not found
ash: syntax error: bad function name
zsh30 unset -v and assoc array

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

stdout:
len=0
len=0
len=0
len=0
len=0
len=0
stderr:
zsh: command not found: shopt
zsh: no matches found: [K]=val
zsh: no matches found: [K]=val
zsh: no matches found: [K]=val
mksh30 unset -v and assoc array

[mksh stdout] Expected 'len=1\nlen=0\nlen=1\nlen=0\nlen=1\nlen=0\n', got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: shopt: not found
mksh: <stdin>[7]: syntax error: '(' unexpected
ksh30 unset -v and assoc array

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

stdout:
stderr: 
E: ksh: <stdin>[1]: shopt: inaccessible or not found
E: ksh: <stdin>[7]: syntax error: unexpected '('
toysh30 unset -v and assoc array

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

stdout:
stderr: 
sh: shopt: No such file or directory
main: line 7: sh: syntax error: )
sush30 unset -v and assoc array

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

stdout:
len=0
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: shopt: eval_unsafe_arith: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: Unexpected token: ()
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: Unexpected token: }

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: 'K': syntax error: operand expected (error token is "'K'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 8: show-len: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 11: show-len: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 13: 'K': syntax error: operand expected (error token is "'K'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 14: show-len: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 17: show-len: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 19: 'K': syntax error: operand expected (error token is "'K'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 20: show-len: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 22: show-len: command not found
brush30 unset -v and assoc array

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

stdout:
len=1
len=1
len=1
len=1
len=1
len=1
stderr:
shopt: eval_unsafe_arith: invalid shell option name
ERROR failed to parse arithmetic expression
ERROR failed to parse arithmetic expression
ERROR failed to parse arithmetic expression
dash31 nameref and assoc array

[dash stdout] Expected 'values: val\nbefore val\nafter val2\nvalues: val2\n---\nbefore val2\nafter val3\nvalues: val3\n' Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: Bad function name
ash31 nameref and assoc array

[ash stdout] Expected 'values: val\nbefore val\nafter val2\nvalues: val2\n---\nbefore val2\nafter val3\nvalues: val3\n' Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: bad function name
zsh31 nameref and assoc array

[zsh stdout] Expected 'values: val\nbefore val\nafter val2\nvalues: val2\n---\nbefore val2\nafter val3\nvalues: val3\n' Got 'values:\nbefore\nafter val2\nvalues:\n---\nbefore val2\nafter val3\nvalues:\n'

stdout:
values:
before
after val2
values:
---
before val2
after val3
values:
stderr:
zsh: no matches found: [K]=val
zsh: bad option: -n
zsh: bad option: -n
mksh31 nameref and assoc array

[mksh stdout] Expected 'values: val\nbefore val\nafter val2\nvalues: val2\n---\nbefore val2\nafter val3\nvalues: val3\n' Got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[5]: syntax error: '(' unexpected
ksh31 nameref and assoc array

[ksh stdout] Expected 'values: val\nbefore val\nafter val2\nvalues: val2\n---\nbefore val2\nafter val3\nvalues: val3\n' Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[5]: syntax error: unexpected '('
toysh31 nameref and assoc array

[toysh stdout] Expected 'values: val\nbefore val\nafter val2\nvalues: val2\n---\nbefore val2\nafter val3\nvalues: val3\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 5: sh: syntax error: )
sush31 nameref and assoc array

[sush stdout] Expected 'values: val\nbefore val\nafter val2\nvalues: val2\n---\nbefore val2\nafter val3\nvalues: val3\n' Got 'values:\nbefore A[K]\nafter val2\n---\nbefore A[K]\nafter val3\n'
[sush status] Expected 0, got 127

stdout:
values:
before A[K]
after val2
---
before A[K]
after val3
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: Unexpected token: ()
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: Unexpected token: }

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: 'K': syntax error: operand expected (error token is "'K'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: show-values: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 12: show-values: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 21: show-values: command not found
brush31 nameref and assoc array

[brush stdout] Expected 'values: val\nbefore val\nafter val2\nvalues: val2\n---\nbefore val2\nafter val3\nvalues: val3\n' Got 'values: val\nbefore A["K"]\nafter val2\nvalues: val\n---\nbefore A[$key]\nafter val3\nvalues: val\n'

stdout:
values: val
before A["K"]
after val2
values: val
---
before A[$key]
after val3
values: val
stderr:
osh31 nameref and assoc array

[osh stdout] Expected 'values: val\nbefore val\nafter val2\nvalues: val2\n---\nbefore val2\nafter val3\nvalues: val3\n' Got 'values: val\nbefore A["K"]\nafter val2\nvalues: val\n---\nbefore A[$key]\nafter val3\nvalues: val\n'

stdout:
values: val
before A["K"]
after val2
values: val
---
before A[$key]
after val3
values: val
stderr:
dash32 ${!ref} and assoc array

[dash stdout] Expected 'values: val\nref val\nref val\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: Bad function name
ash32 ${!ref} and assoc array

[ash stdout] Expected 'values: val\nref val\nref val\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: bad function name
zsh32 ${!ref} and assoc array

[zsh stdout] Expected 'values: val\nref val\nref val\n', got 'values:\n'
[zsh status] Expected 0, got 1

stdout:
values:
stderr:
zsh: no matches found: [K]=val
zsh: bad substitution
mksh32 ${!ref} and assoc array

[mksh stdout] Expected 'values: val\nref val\nref val\n', got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[5]: syntax error: '(' unexpected
ksh32 ${!ref} and assoc array

[ksh stdout] Expected 'values: val\nref val\nref val\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[5]: syntax error: unexpected '('
toysh32 ${!ref} and assoc array

[toysh stdout] Expected 'values: val\nref val\nref val\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 5: sh: syntax error: )
sush32 ${!ref} and assoc array

[sush stdout] Expected 'values: val\nref val\nref val\n', got 'values:\nref\nref\n'

stdout:
values:
ref
ref
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: Unexpected token: ()
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: Unexpected token: }

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: 'K': syntax error: operand expected (error token is "'K'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: show-values: command not found
dash33 printf -v and assoc array

[dash stdout] Expected 'values: val\nvalues: /val2/\nvalues: /val3/\n' Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: Bad function name
ash33 printf -v and assoc array

[ash stdout] Expected 'values: val\nvalues: /val2/\nvalues: /val3/\n' Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: bad function name
zsh33 printf -v and assoc array

[zsh stdout] Expected 'values: val\nvalues: /val2/\nvalues: /val3/\n' Got 'values:\n-vvalues:\n-vvalues:\n'

stdout:
values:
-vvalues:
-vvalues:
stderr:
zsh: no matches found: [K]=val
mksh33 printf -v and assoc array

[mksh stdout] Expected 'values: val\nvalues: /val2/\nvalues: /val3/\n' Got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[5]: syntax error: '(' unexpected
ksh33 printf -v and assoc array

[ksh stdout] Expected 'values: val\nvalues: /val2/\nvalues: /val3/\n' Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[5]: syntax error: unexpected '('
toysh33 printf -v and assoc array

[toysh stdout] Expected 'values: val\nvalues: /val2/\nvalues: /val3/\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 5: sh: syntax error: )
sush33 printf -v and assoc array

[sush stdout] Expected 'values: val\nvalues: /val2/\nvalues: /val3/\n' Got 'values:\n'
[sush status] Expected 0, got 127

stdout:
values:
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: Unexpected token: ()
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: Unexpected token: }

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: 'K': syntax error: operand expected (error token is "'K'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: show-values: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: show-values: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 13: show-values: command not found
bash34 bash bug: (( A["$key"] = 1 )) doesn't work

[bash stdout] Expected '[]\n[]\n', got "['\\\\']\n['42']\n"

stdout:
['\\']
['42']
stderr:
dash34 bash bug: (( A["$key"] = 1 )) doesn't work

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

stdout:
stderr: 
dash: 2: declare: not found
dash: 6: A[\]: not found
dash: 8: Bad substitution
ash34 bash bug: (( A["$key"] = 1 )) doesn't work

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

stdout:
stderr: 
ash: declare: not found
ash: A[\]: not found
ash: syntax error: bad substitution
zsh34 bash bug: (( A["$key"] = 1 )) doesn't work

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

stdout:
stderr: 
zsh: bad substitution
mksh34 bash bug: (( A["$key"] = 1 )) doesn't work

[mksh stdout] Expected "['\\\\']\n['42']\n", got "['0']\n['42']\n"

stdout:
['0']
['42']
stderr:
mksh: <stdin>[2]: declare: not found
ksh34 bash bug: (( A["$key"] = 1 )) doesn't work

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

stdout:
['0']
['42']
stderr:
E: ksh: <stdin>[2]: declare: inaccessible or not found
toysh34 bash bug: (( A["$key"] = 1 )) doesn't work

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

stdout:
['']
['']
stderr:
main: line 6: sh: bad math:  A[\] = 42  @ 2
brush34 bash bug: (( A["$key"] = 1 )) doesn't work

[brush stdout] Expected "['\\\\']\n['42']\n", got '[]\n[]\n'

stdout:
[]
[]
stderr:
ERROR error: arithmetic evaluation error: failed to parse expression: 'A[\] = 42'
dash35 Implicit increment of keys

[dash stdout] Expected "['30', '31', '40', '41']\n['a', 'b', 'x', 'y']\n" Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash35 Implicit increment of keys

[ash stdout] Expected "['30', '31', '40', '41']\n['a', 'b', 'x', 'y']\n" Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh35 Implicit increment of keys

[zsh stdout] Expected "['30', '31', '40', '41']\n['a', 'b', 'x', 'y']\n" Got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: no matches found: [30]=a
zsh: bad substitution
mksh35 Implicit increment of keys

[mksh stdout] Expected "['30', '31', '40', '41']\n['a', 'b', 'x', 'y']\n" Got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh35 Implicit increment of keys

[ksh stdout] Expected "['30', '31', '40', '41']\n['a', 'b', 'x', 'y']\n" Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
toysh35 Implicit increment of keys

[toysh stdout] Expected "['30', '31', '40', '41']\n['a', 'b', 'x', 'y']\n" Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: )
dash36 test -v assoc[key]

[dash stdout] Expected 'no quotes\nempty=0\nk=0\nnonexistent=1\n\nquotes\nempty=0\nk=0\nnonexistent=1\n' Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: typeset: not found
dash: 2: Syntax error: "(" unexpected
ash36 test -v assoc[key]

[ash stdout] Expected 'no quotes\nempty=0\nk=0\nnonexistent=1\n\nquotes\nempty=0\nk=0\nnonexistent=1\n' Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: typeset: not found
ash: syntax error: unexpected "("
zsh36 test -v assoc[key]

[zsh stdout] Expected 'no quotes\nempty=0\nk=0\nnonexistent=1\n\nquotes\nempty=0\nk=0\nnonexistent=1\n' Got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: no matches found: [empty]=
mksh36 test -v assoc[key]

[mksh stdout] Expected 'no quotes\nempty=0\nk=0\nnonexistent=1\n\nquotes\nempty=0\nk=0\nnonexistent=1\n' Got 'no quotes\nempty=2\nk=2\nnonexistent=2\n\nquotes\nempty=2\nk=2\nnonexistent=2\n'

stdout:
no quotes
empty=2
k=2
nonexistent=2

quotes
empty=2
k=2
nonexistent=2
stderr:
mksh: <stdin>[1]: typeset: -A: unknown option
mksh: <stdin>[6]: test: assoc[empty]: unexpected operator/operand
mksh: <stdin>[9]: test: assoc[k]: unexpected operator/operand
mksh: <stdin>[12]: test: assoc[nonexistent]: unexpected operator/operand
mksh: <stdin>[19]: test: assoc[empty]: unexpected operator/operand
mksh: <stdin>[22]: test: assoc[k]: unexpected operator/operand
mksh: <stdin>[25]: test: assoc[nonexistent]: unexpected operator/operand
ksh36 test -v assoc[key]

[ksh stdout] Expected 'no quotes\nempty=0\nk=0\nnonexistent=1\n\nquotes\nempty=0\nk=0\nnonexistent=1\n' Got 'no quotes\nempty=0\nk=0\nnonexistent=0\n\nquotes\nempty=0\nk=0\nnonexistent=0\n'

stdout:
no quotes
empty=0
k=0
nonexistent=0

quotes
empty=0
k=0
nonexistent=0
stderr:
E: ksh: <stdin>[1]: typeset: -A: unknown option
toysh36 test -v assoc[key]

[toysh stdout] Expected 'no quotes\nempty=0\nk=0\nnonexistent=1\n\nquotes\nempty=0\nk=0\nnonexistent=1\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
sh: typeset: No such file or directory
main: line 2: sh: syntax error: [empty]=''
sush36 test -v assoc[key]

[sush stdout] Expected 'no quotes\nempty=0\nk=0\nnonexistent=1\n\nquotes\nempty=0\nk=0\nnonexistent=1\n' Got 'no quotes\nempty=2\nk=2\nnonexistent=2\n\nquotes\nempty=2\nk=2\nnonexistent=2\n'

stdout:
no quotes
empty=2
k=2
nonexistent=2

quotes
empty=2
k=2
nonexistent=2
stderr:
test: ‘-v’: unary operator expected
test: ‘-v’: unary operator expected
test: ‘-v’: unary operator expected
test: ‘-v’: unary operator expected
test: ‘-v’: unary operator expected
test: ‘-v’: unary operator expected
brush36 test -v assoc[key]

[brush stdout] Expected 'no quotes\nempty=0\nk=0\nnonexistent=1\n\nquotes\nempty=0\nk=0\nnonexistent=1\n' Got 'no quotes\nempty=1\nk=1\nnonexistent=1\n\nquotes\nempty=1\nk=1\nnonexistent=1\n'

stdout:
no quotes
empty=1
k=1
nonexistent=1

quotes
empty=1
k=1
nonexistent=1
stderr:
dash37 test -v with dynamic parsing

[dash stdout] Expected 'empty=0\nk=0\nnonexistent=1\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: typeset: not found
dash: 2: Syntax error: "(" unexpected
ash37 test -v with dynamic parsing

[ash stdout] Expected 'empty=0\nk=0\nnonexistent=1\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: typeset: not found
ash: syntax error: unexpected "("
zsh37 test -v with dynamic parsing

[zsh stdout] Expected 'empty=0\nk=0\nnonexistent=1\n', got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: no matches found: [empty]=
mksh37 test -v with dynamic parsing

[mksh stdout] Expected 'empty=0\nk=0\nnonexistent=1\n', got 'empty=2\nk=2\nnonexistent=2\n'

stdout:
empty=2
k=2
nonexistent=2
stderr:
mksh: <stdin>[1]: typeset: -A: unknown option
mksh: <stdin>[5]: test: assoc[$key]: unexpected operator/operand
mksh: <stdin>[9]: test: assoc[$key]: unexpected operator/operand
mksh: <stdin>[13]: test: assoc[$key]: unexpected operator/operand
ksh37 test -v with dynamic parsing

[ksh stdout] Expected 'empty=0\nk=0\nnonexistent=1\n', got 'empty=0\nk=0\nnonexistent=0\n'

stdout:
empty=0
k=0
nonexistent=0
stderr:
E: ksh: <stdin>[1]: typeset: -A: unknown option
toysh37 test -v with dynamic parsing

[toysh stdout] Expected 'empty=0\nk=0\nnonexistent=1\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
sh: typeset: No such file or directory
main: line 2: sh: syntax error: [empty]=''
sush37 test -v with dynamic parsing

[sush stdout] Expected 'empty=0\nk=0\nnonexistent=1\n', got 'empty=2\nk=2\nnonexistent=2\n'

stdout:
empty=2
k=2
nonexistent=2
stderr:
test: ‘-v’: unary operator expected
test: ‘-v’: unary operator expected
test: ‘-v’: unary operator expected
brush37 test -v with dynamic parsing

[brush stdout] Expected 'empty=0\nk=0\nnonexistent=1\n', got 'empty=1\nk=1\nnonexistent=1\n'

stdout:
empty=1
k=1
nonexistent=1
stderr:
osh37 test -v with dynamic parsing

[osh stdout] Expected 'empty=0\nk=0\nnonexistent=1\n', got 'empty=1\nk=1\nnonexistent=1\n'

stdout:
empty=1
k=1
nonexistent=1
stderr:
dash38 [[ -v assoc[key] ]]

[dash stdout] Expected 'no quotes\nempty=0\nk=0\nnonexistent=1\n\nquotes\nempty=0\nk=0\nnonexistent=1\n\nvars\nempty=0\nk=0\nnonexistent=1\n' Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: typeset: not found
dash: 2: Syntax error: "(" unexpected
ash38 [[ -v assoc[key] ]]

[ash stdout] Expected 'no quotes\nempty=0\nk=0\nnonexistent=1\n\nquotes\nempty=0\nk=0\nnonexistent=1\n\nvars\nempty=0\nk=0\nnonexistent=1\n' Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: typeset: not found
ash: syntax error: unexpected "("
zsh38 [[ -v assoc[key] ]]

[zsh stdout] Expected 'no quotes\nempty=0\nk=0\nnonexistent=1\n\nquotes\nempty=0\nk=0\nnonexistent=1\n\nvars\nempty=0\nk=0\nnonexistent=1\n' Got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: no matches found: [empty]=
mksh38 [[ -v assoc[key] ]]

[mksh stdout] Expected '', got 'no quotes\n'

stdout:
no quotes
stderr:
mksh: <stdin>[1]: typeset: -A: unknown option
mksh: <stdin>[6]: syntax error: 'assoc[empty]' unexpected operator/operand
ksh38 [[ -v assoc[key] ]]

[ksh stdout] Expected 'no quotes\nempty=0\nk=0\nnonexistent=1\n\nquotes\nempty=0\nk=0\nnonexistent=1\n\nvars\nempty=0\nk=0\nnonexistent=1\n' Got 'no quotes\nempty=0\nk=0\nnonexistent=0\n\nquotes\n'
[ksh status] Expected 0, got 1

stdout:
no quotes
empty=0
k=0
nonexistent=0

quotes
stderr:
E: ksh: <stdin>[1]: typeset: -A: unknown option
W: ksh: <stdin>[19]: "empty": unexpected '"'
toysh38 [[ -v assoc[key] ]]

[toysh stdout] Expected 'no quotes\nempty=0\nk=0\nnonexistent=1\n\nquotes\nempty=0\nk=0\nnonexistent=1\n\nvars\nempty=0\nk=0\nnonexistent=1\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
sh: typeset: No such file or directory
main: line 2: sh: syntax error: [empty]=''
sush38 [[ -v assoc[key] ]]

[sush stdout] Expected 'no quotes\nempty=0\nk=0\nnonexistent=1\n\nquotes\nempty=0\nk=0\nnonexistent=1\n\nvars\nempty=0\nk=0\nnonexistent=1\n' Got 'no quotes\nempty=1\nk=1\nnonexistent=1\n\nquotes\nempty=1\nk=1\nnonexistent=1\n\nvars\nempty=1\nk=1\nnonexistent=1\n'

stdout:
no quotes
empty=1
k=1
nonexistent=1

quotes
empty=1
k=1
nonexistent=1

vars
empty=1
k=1
nonexistent=1
stderr:
brush38 [[ -v assoc[key] ]]

[brush stdout] Expected 'no quotes\nempty=0\nk=0\nnonexistent=1\n\nquotes\nempty=0\nk=0\nnonexistent=1\n\nvars\nempty=0\nk=0\nnonexistent=1\n' Got 'no quotes\nempty=1\nk=1\nnonexistent=1\n\nquotes\nempty=1\nk=1\nnonexistent=1\n\nvars\nempty=1\nk=1\nnonexistent=1\n'

stdout:
no quotes
empty=1
k=1
nonexistent=1

quotes
empty=1
k=1
nonexistent=1

vars
empty=1
k=1
nonexistent=1
stderr:
dash39 [[ -v assoc[key] ]] syntax errors

[dash stdout] Expected 'empty=0\nk=0\ntypo=1\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: typeset: not found
dash: 2: Syntax error: "(" unexpected
ash39 [[ -v assoc[key] ]] syntax errors

[ash stdout] Expected 'empty=0\nk=0\ntypo=1\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: typeset: not found
ash: syntax error: unexpected "("
zsh39 [[ -v assoc[key] ]] syntax errors

[zsh stdout] Expected 'empty=0\nk=0\ntypo=1\n', got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: no matches found: [empty]=
mksh39 [[ -v assoc[key] ]] syntax errors

[mksh stdout] Expected 'empty=0\nk=0\ntypo=1\n', got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: typeset: -A: unknown option
mksh: <stdin>[4]: syntax error: 'assoc[empty]' unexpected operator/operand
ksh39 [[ -v assoc[key] ]] syntax errors

[ksh stdout] Expected 'empty=0\nk=0\ntypo=1\n', got 'empty=0\nk=0\ntypo=0\n'

stdout:
empty=0
k=0
typo=0
stderr:
E: ksh: <stdin>[1]: typeset: -A: unknown option
toysh39 [[ -v assoc[key] ]] syntax errors

[toysh stdout] Expected 'empty=0\nk=0\ntypo=1\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
sh: typeset: No such file or directory
main: line 2: sh: syntax error: [empty]=''
sush39 [[ -v assoc[key] ]] syntax errors

[sush stdout] Expected 'empty=0\nk=0\ntypo=1\n', got 'empty=1\nk=1\ntypo=1\n'

stdout:
empty=1
k=1
typo=1
stderr:
brush39 [[ -v assoc[key] ]] syntax errors

[brush stdout] Expected 'empty=0\nk=0\ntypo=1\n', got 'empty=1\nk=1\ntypo=1\n'

stdout:
empty=1
k=1
typo=1
stderr:
dash40 BashAssoc a+=()

[dash stdout] Expected 'apple is red\norange is orange\nlemon is yellow\nbanana is yellow\n' Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash40 BashAssoc a+=()

[ash stdout] Expected 'apple is red\norange is orange\nlemon is yellow\nbanana is yellow\n' Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh40 BashAssoc a+=()

[zsh stdout] Expected 'apple is red\norange is orange\nlemon is yellow\nbanana is yellow\n' Got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: no matches found: [apple]=red
zsh: no matches found: [lemon]=yellow
mksh40 BashAssoc a+=()

[mksh stdout] Expected 'apple is red\norange is orange\nlemon is yellow\nbanana is yellow\n' Got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh40 BashAssoc a+=()

[ksh stdout] Expected 'apple is red\norange is orange\nlemon is yellow\nbanana is yellow\n' Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
toysh40 BashAssoc a+=()

[toysh stdout] Expected 'apple is red\norange is orange\nlemon is yellow\nbanana is yellow\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: )
sush40 BashAssoc a+=()

[sush stdout] Expected 'apple is red\norange is orange\nlemon is yellow\nbanana is yellow\n' Got ''
[sush status] Expected 0, got 1

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: 'apple': syntax error: operand expected (error token is "'apple'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: 'orange': syntax error: operand expected (error token is "'orange'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: 'lemon': syntax error: operand expected (error token is "'lemon'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: 'banana': syntax error: operand expected (error token is "'banana'")
bash41 BashAssoc ${a[@]@Q}

[bash stdout] Expected '[\'[]*?\' \'\'\\\'\'\'\\\'\'\' \'"\' \'()<>&|\']\n[\'[]*?\' \'\'\\\'\'\'\\\'\'\' \'"\' \'()<>&|\']\n' Got '[\'[]*?\' \'()<>&|\' \'"\' \'\'\\\'\'\'\\\'\'\']\n[\'[]*?\' \'()<>&|\' \'"\' \'\'\\\'\'\'\\\'\'\']\n'

stdout:
['[]*?' '()<>&|' '"' ''\'''\''']
['[]*?' '()<>&|' '"' ''\'''\''']
stderr:
dash41 BashAssoc ${a[@]@Q}

[dash stdout] Expected '[$\'\\\'\\\'\' \'"\' \'()<>&|\' \'[]*?\']\n[$\'\\\'\\\'\' \'"\' \'()<>&|\' \'[]*?\']\n' Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash41 BashAssoc ${a[@]@Q}

[ash stdout] Expected '[$\'\\\'\\\'\' \'"\' \'()<>&|\' \'[]*?\']\n[$\'\\\'\\\'\' \'"\' \'()<>&|\' \'[]*?\']\n' Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh41 BashAssoc ${a[@]@Q}

[zsh stdout] Expected '[$\'\\\'\\\'\' \'"\' \'()<>&|\' \'[]*?\']\n[$\'\\\'\\\'\' \'"\' \'()<>&|\' \'[]*?\']\n' Got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: bad substitution
mksh41 BashAssoc ${a[@]@Q}

[mksh stdout] Expected '[$\'\\\'\\\'\' \'"\' \'()<>&|\' \'[]*?\']\n[$\'\\\'\\\'\' \'"\' \'()<>&|\' \'[]*?\']\n' Got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh41 BashAssoc ${a[@]@Q}

[ksh stdout] Expected '[$\'\\\'\\\'\' \'"\' \'()<>&|\' \'[]*?\']\n[$\'\\\'\\\'\' \'"\' \'()<>&|\' \'[]*?\']\n' Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
toysh41 BashAssoc ${a[@]@Q}

[toysh stdout] Expected '[$\'\\\'\\\'\' \'"\' \'()<>&|\' \'[]*?\']\n[$\'\\\'\\\'\' \'"\' \'()<>&|\' \'[]*?\']\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: )
sush41 BashAssoc ${a[@]@Q}

[sush stdout] Expected '[$\'\\\'\\\'\' \'"\' \'()<>&|\' \'[]*?\']\n[$\'\\\'\\\'\' \'"\' \'()<>&|\' \'[]*?\']\n' Got ''
[sush status] Expected 0, got 1

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: 'symbol1': syntax error: operand expected (error token is "'symbol1'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: 'symbol2': syntax error: operand expected (error token is "'symbol2'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: 'symbol3': syntax error: operand expected (error token is "'symbol3'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: 'symbol4': syntax error: operand expected (error token is "'symbol4'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: `${a[@]@Q}': bad substitution
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: `${a[*]@Q}': bad substitution
brush41 BashAssoc ${a[@]@Q}

[brush stdout] Expected '[$\'\\\'\\\'\' \'"\' \'()<>&|\' \'[]*?\']\n[$\'\\\'\\\'\' \'"\' \'()<>&|\' \'[]*?\']\n' Got '[\\\'\\\' \'"\' \'()<>&|\' \'[]*?\']\n[\\\'\\\' \'"\' \'()<>&|\' \'[]*?\']\n'

stdout:
[\'\' '"' '()<>&|' '[]*?']
[\'\' '"' '()<>&|' '[]*?']
stderr: