Results for var-ref.test.sh

statusbashdashashzshmkshkshtoyshsushbrushosh
pass 26005235172131
ok 2000000000
N-I 1000000000
BUG 2000000000
FAIL 031312629282614100
total31313131313131313131
casebashdashashzshmkshkshtoyshsushbrushoshdescription
0pass FAIL FAIL FAIL FAIL FAIL pass pass pass pass var ref ${!a}
detailsdetailsdetailsdetailsdetails
1pass FAIL FAIL FAIL FAIL FAIL pass pass pass pass ${!ref-default}
detailsdetailsdetailsdetailsdetails
2pass FAIL FAIL FAIL FAIL FAIL FAIL pass FAIL pass ${!undef:-}
detailsdetailsdetailsdetailsdetailsdetailsdetails
3BUG FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass pass comparison to ${!array[@]} keys (similar SYNTAX)
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
4pass FAIL FAIL pass FAIL pass FAIL pass pass pass ${!a[@]-'default'} is legal but fails with more than one element
detailsdetailsdetailsdetails
5pass FAIL FAIL FAIL FAIL FAIL FAIL pass pass pass var ref to $@ with @
detailsdetailsdetailsdetailsdetailsdetails
6pass FAIL FAIL FAIL FAIL FAIL FAIL pass pass pass var ref to $1 and $2 with 1 and 2
detailsdetailsdetailsdetailsdetailsdetails
7pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass pass var ref: 1, @, *
detailsdetailsdetailsdetailsdetailsdetailsdetails
8pass FAIL FAIL FAIL FAIL FAIL pass pass pass pass var ref to special var BASH_SOURCE
detailsdetailsdetailsdetailsdetails
9pass FAIL FAIL FAIL FAIL FAIL FAIL pass pass pass var ref to $? with '?'
detailsdetailsdetailsdetailsdetailsdetails
10pass FAIL FAIL FAIL FAIL FAIL FAIL pass FAIL pass Var ref, then assignment with ${ := }
detailsdetailsdetailsdetailsdetailsdetailsdetails
11pass FAIL FAIL pass FAIL pass FAIL FAIL FAIL pass Var ref, then error with ${ ? }
detailsdetailsdetailsdetailsdetailsdetails
12pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass pass Indirect expansion, THEN suffix operators
detailsdetailsdetailsdetailsdetailsdetailsdetails
13pass FAIL FAIL FAIL FAIL FAIL FAIL pass pass pass var ref OF array var -- silent a[0] decay
detailsdetailsdetailsdetailsdetailsdetails
14pass FAIL FAIL FAIL FAIL FAIL FAIL pass pass pass array ref
detailsdetailsdetailsdetailsdetailsdetails
15N-I FAIL FAIL pass pass pass FAIL FAIL FAIL pass array ref with strict_array
detailsdetailsdetailsdetailsdetailsdetails
16pass FAIL FAIL FAIL FAIL FAIL FAIL pass pass pass var ref TO array var
detailsdetailsdetailsdetailsdetailsdetails
17pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass pass var ref TO array var, with subscripts
detailsdetailsdetailsdetailsdetailsdetailsdetails
18pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass pass var ref TO assoc array a[key]
detailsdetailsdetailsdetailsdetailsdetailsdetails
19pass FAIL FAIL FAIL FAIL FAIL FAIL pass pass pass var ref TO array with arbitrary subscripts
detailsdetailsdetailsdetailsdetailsdetails
20pass FAIL FAIL pass FAIL FAIL FAIL pass pass pass Bizarre tilde expansion in array index
detailsdetailsdetailsdetailsdetails
21pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass pass Indirect expansion TO fancy expansion features bash disallows
detailsdetailsdetailsdetailsdetailsdetailsdetails
22pass FAIL FAIL FAIL FAIL FAIL pass pass pass pass Bad var ref
detailsdetailsdetailsdetailsdetails
23pass FAIL FAIL FAIL FAIL FAIL pass pass pass pass Bad var ref 2
detailsdetailsdetailsdetailsdetails
24pass FAIL FAIL FAIL FAIL FAIL FAIL pass pass pass ${!OPTIND} (used by bash completion
detailsdetailsdetailsdetailsdetailsdetails
25ok FAIL FAIL FAIL pass FAIL FAIL FAIL FAIL pass var ref doesn't need cycle detection
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
26BUG FAIL FAIL pass FAIL FAIL FAIL FAIL FAIL pass Var Ref Code Injection $(tee PWNED)
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
27pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass ${!array_ref:-set} and ${!array_ref:=assign}
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
28pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass Array indirect expansion with suffix operators
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
29pass FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass Array indirect expansion with replacements
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
30ok FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL pass Array indirect expansion with @? conversion
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
110 passed, 2 OK, 1 not implemented, 2 BUG, 195 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

dash0 var ref ${!a}

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

stdout:
stderr: 
dash: 3: Bad substitution
ash0 var ref ${!a}

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

stdout:
stderr: 
ash: syntax error: bad substitution
zsh0 var ref ${!a}

[zsh stdout] Expected 'ref c b\n', got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: bad substitution
mksh0 var ref ${!a}

[mksh stdout] Expected 'ref c b\n', got 'ref a b\n'

stdout:
ref a b
stderr:
ksh0 var ref ${!a}

[ksh stdout] Expected 'ref c b\n', got 'ref a b\n'

stdout:
ref a b
stderr:
dash1 ${!ref-default}

[dash stdout] Expected 'x=default\nx=\nx=foo\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 2: Bad substitution
ash1 ${!ref-default}

[ash stdout] Expected 'x=default\nx=\nx=foo\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: bad substitution
zsh1 ${!ref-default}

[zsh stdout] Expected 'x=default\nx=\nx=foo\n', got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: bad substitution
mksh1 ${!ref-default}

[mksh stdout] Expected 'x=default\nx=\nx=foo\n', got 'x=ref\nx=ref\nx=ref\n'

stdout:
x=ref
x=ref
x=ref
stderr:
ksh1 ${!ref-default}

[ksh stdout] Expected 'x=default\nx=\nx=foo\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[2]: ${!ref-default}: bad substitution
dash2 ${!undef:-}

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

stdout:
stderr: 
dash: 1: Bad substitution
ash2 ${!undef:-}

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

stdout:
stderr: 
ash: syntax error: bad substitution
zsh2 ${!undef:-}

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

stdout:
stderr: 
zsh: bad substitution
mksh2 ${!undef:-}

[mksh stdout] Expected 'NOUNSET\n', got 'undef=undef\nundef=undef\nNOUNSET\nundef=undef\nundef=undef\n'
[mksh status] Expected 1, got 0

stdout:
undef=undef
undef=undef
NOUNSET
undef=undef
undef=undef
stderr:
ksh2 ${!undef:-}

[ksh stdout] Expected 'NOUNSET\n', got ''

stdout:
stderr: 
E: ksh: <stdin>[1]: ${!undef-"default"}: bad substitution
toysh2 ${!undef:-}

[toysh stdout] Expected 'NOUNSET\n', got "undef='default'\nundef=\nNOUNSET\nundef='default'\nundef=\n"
[toysh status] Expected 1, got 0

stdout:
undef='default'
undef=
NOUNSET
undef='default'
undef=
stderr:
brush2 ${!undef:-}

[brush status] Expected 1, got 0

stdout:
NOUNSET
stderr:
ERROR error: failed to parse parameter ''
ERROR error: failed to parse parameter ''
ERROR error: failed to parse parameter ''
ERROR error: failed to parse parameter ''
bash3 comparison to ${!array[@]} keys (similar SYNTAX)

stdout:
['0', '1']
a_keys=0
['']
a_nobrackets=0
---
['A', 'B']
A_keys=0
['']
A_nobrackets=0
stderr:
dash3 comparison to ${!array[@]} keys (similar SYNTAX)

[dash stdout] Expected "['0', '1']\na_keys=0\n['']\na_nobrackets=0\n---\n['A', 'B']\nA_keys=0\nA_nobrackets=1\n" Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash3 comparison to ${!array[@]} keys (similar SYNTAX)

[ash stdout] Expected "['0', '1']\na_keys=0\n['']\na_nobrackets=0\n---\n['A', 'B']\nA_keys=0\nA_nobrackets=1\n" Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh3 comparison to ${!array[@]} keys (similar SYNTAX)

[zsh stdout] Expected "['0', '1']\na_keys=0\n['']\na_nobrackets=0\n---\n['A', 'B']\nA_keys=0\nA_nobrackets=1\n" Got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: bad substitution
mksh3 comparison to ${!array[@]} keys (similar SYNTAX)

[mksh stdout] Expected "['0', '1']\na_keys=0\n['']\na_nobrackets=0\n---\n['A', 'B']\nA_keys=0\nA_nobrackets=1\n" Got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh3 comparison to ${!array[@]} keys (similar SYNTAX)

[ksh stdout] Expected "['0', '1']\na_keys=0\n['']\na_nobrackets=0\n---\n['A', 'B']\nA_keys=0\nA_nobrackets=1\n" Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
toysh3 comparison to ${!array[@]} keys (similar SYNTAX)

[toysh stdout] Expected "['0', '1']\na_keys=0\n['']\na_nobrackets=0\n---\n['A', 'B']\nA_keys=0\nA_nobrackets=1\n" Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: )
sush3 comparison to ${!array[@]} keys (similar SYNTAX)

[sush stdout] Expected "['0', '1']\na_keys=0\n['']\na_nobrackets=0\n---\n['A', 'B']\nA_keys=0\nA_nobrackets=1\n" Got "['0', '1']\na_keys=0\n['']\na_nobrackets=0\n---\n['0']\nA_keys=0\n['']\nA_nobrackets=0\n"

stdout:
['0', '1']
a_keys=0
['']
a_nobrackets=0
---
['0']
A_keys=0
['']
A_nobrackets=0
stderr:
dash4 ${!a[@]-'default'} is legal but fails with more than one element

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

stdout:
status=2
stderr:
dash: 1: Bad substitution
dash: 4: Syntax error: "(" unexpected
ash4 ${!a[@]-'default'} is legal but fails with more than one element

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

stdout:
status=2
stderr:
ash: syntax error: bad substitution
ash: syntax error: unexpected "("
mksh4 ${!a[@]-'default'} is legal but fails with more than one element

[mksh stdout] Expected 'status=1\nstatus=1\n', got "['default']\nstatus=0\n['0', '1', '2']\nstatus=0\n"

stdout:
['default']
status=0
['0', '1', '2']
status=0
stderr:
toysh4 ${!a[@]-'default'} is legal but fails with more than one element

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

stdout:
['']
status=0
stderr:
main: line 4: sh: syntax error: x
dash5 var ref to $@ with @

[dash stdout] Expected 'ref=one two\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 3: Bad substitution
ash5 var ref to $@ with @

[ash stdout] Expected 'ref=one two\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: bad substitution
zsh5 var ref to $@ with @

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

stdout:
stderr: 
zsh: bad substitution
mksh5 var ref to $@ with @

[mksh stdout] Expected 'ref=one two\n', got 'ref=ref\n'

stdout:
ref=ref
stderr:
ksh5 var ref to $@ with @

[ksh stdout] Expected 'ref=one two\n', got 'ref=ref\n'

stdout:
ref=ref
stderr:
toysh5 var ref to $@ with @

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

stdout:
stderr: 
set: bad --
main: line 3: sh: @: bad substitution
dash6 var ref to $1 and $2 with 1 and 2

[dash stdout] Expected 'ref1=one\nref2=two\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 3: Bad substitution
ash6 var ref to $1 and $2 with 1 and 2

[ash stdout] Expected 'ref1=one\nref2=two\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: bad substitution
zsh6 var ref to $1 and $2 with 1 and 2

[zsh stdout] Expected 'ref1=one\nref2=two\n', got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: bad substitution
mksh6 var ref to $1 and $2 with 1 and 2

[mksh stdout] Expected 'ref1=one\nref2=two\n', got 'ref1=ref1\nref2=ref2\n'

stdout:
ref1=ref1
ref2=ref2
stderr:
ksh6 var ref to $1 and $2 with 1 and 2

[ksh stdout] Expected 'ref1=one\nref2=two\n', got 'ref1=ref1\nref2=ref2\n'

stdout:
ref1=ref1
ref2=ref2
stderr:
toysh6 var ref to $1 and $2 with 1 and 2

[toysh stdout] Expected 'ref1=one\nref2=two\n', got 'ref1=\nref2=\n'

stdout:
ref1=
ref2=
stderr:
set: bad --
dash7 var ref: 1, @, *

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

stdout:
stderr: 
dash: 2: Bad substitution
ash7 var ref: 1, @, *

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

stdout:
stderr: 
ash: syntax error: bad substitution
zsh7 var ref: 1, @, *

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

stdout:
stderr: 
zsh: bad substitution
mksh7 var ref: 1, @, *

[mksh stdout] Expected "['x']\n['x', 'y']\n['x y']\n", got "['ref']\n['ref']\n['ref']\n"

stdout:
['ref']
['ref']
['ref']
stderr:
ksh7 var ref: 1, @, *

[ksh stdout] Expected "['x']\n['x', 'y']\n['x y']\n", got "['ref']\n['ref']\n['ref']\n"

stdout:
['ref']
['ref']
['ref']
stderr:
toysh7 var ref: 1, @, *

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

stdout:
['']
stderr:
set: bad --
main: line 3: sh: @: bad substitution
main: line 4: sh: *: bad substitution
sush7 var ref: 1, @, *

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

stdout:
['x']
['x y']
['x y']
stderr:
dash8 var ref to special var BASH_SOURCE

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

stdout:
stderr: 
dash: 2: Bad substitution
ash8 var ref to special var BASH_SOURCE

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

stdout:
stderr: 
ash: syntax error: bad substitution
zsh8 var ref to special var BASH_SOURCE

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

stdout:
stderr: 
zsh: bad substitution
mksh8 var ref to special var BASH_SOURCE

[mksh stdout] Expected 'lineno=2\n', got 'lineno=ref\n'

stdout:
lineno=ref
stderr:
ksh8 var ref to special var BASH_SOURCE

[ksh stdout] Expected 'lineno=2\n', got 'lineno=ref\n'

stdout:
lineno=ref
stderr:
dash9 var ref to $? with '?'

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

stdout:
stderr: 
dash: 3: Bad substitution
ash9 var ref to $? with '?'

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

stdout:
stderr: 
ash: syntax error: bad substitution
zsh9 var ref to $? with '?'

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

stdout:
stderr: 
myfunc:2: bad substitution
mksh9 var ref to $? with '?'

[mksh stdout] Expected 'myfunc\n0\n', got 'ref\nref\n'

stdout:
ref
ref
stderr:
ksh9 var ref to $? with '?'

[ksh stdout] Expected 'myfunc\n0\n', got 'ref\nref\n'

stdout:
ref
ref
stderr:
toysh9 var ref to $? with '?'

[toysh stdout] Expected 'myfunc\n0\n', got '\n0\n'

stdout:
0
stderr:
dash10 Var ref, then assignment with ${ := }

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

stdout:
stderr: 
dash: 3: Bad substitution
ash10 Var ref, then assignment with ${ := }

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

stdout:
stderr: 
ash: syntax error: bad substitution
zsh10 Var ref, then assignment with ${ := }

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

stdout:
stderr: 
zsh: bad substitution
mksh10 Var ref, then assignment with ${ := }

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

stdout:
stderr: 
mksh: <stdin>[3]: ${!z:=foo}: bad substitution
ksh10 Var ref, then assignment with ${ := }

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

stdout:
stderr: 
E: ksh: <stdin>[3]: ${!z:=foo}: bad substitution
toysh10 Var ref, then assignment with ${ := }

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

stdout:
foo
stderr:
main: line 4: sh: bad ${!z:=bar} @ 5
brush10 Var ref, then assignment with ${ := }

[brush stdout] Expected 'foo\nfoo\n', got 'foo\nbar\n'

stdout:
foo
bar
stderr:
dash11 Var ref, then error with ${ ? }

[dash status] Expected 1, got 2

stdout:
stderr: 
dash: 3: Bad substitution
ash11 Var ref, then error with ${ ? }

[ash status] Expected 1, got 2

stdout:
stderr: 
ash: syntax error: bad substitution
mksh11 Var ref, then error with ${ ? }

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

stdout:
w
done
stderr:
toysh11 Var ref, then error with ${ ? }

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

stdout:
done
stderr:
main: line 3: sh: ww: 'my message'
sush11 Var ref, then error with ${ ? }

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

stdout:
done
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: ww: my message
brush11 Var ref, then error with ${ ? }

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

stdout:
done
stderr:
ERROR error: expansion error: my message
dash12 Indirect expansion, THEN suffix operators

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

stdout:
stderr: 
dash: 22: Syntax error: "(" unexpected
ash12 Indirect expansion, THEN suffix operators

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

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh12 Indirect expansion, THEN suffix operators

[zsh stdout] Expected 'ok\n', got '${!a[1]} -> expected xx, got \n${!b[1]} -> expected asdf, got \n${!y:-foo} -> expected foo, got \n${!x:-foo} -> expected aaabcc, got \n${!x:?oops} -> expected aaabcc, got \n${!x:+foo} -> expected foo, got \n${!x:2} -> expected abcc, got \n${!x:2:2} -> expected ab, got \n${!x#*a} -> expected aabcc, got \n${!x%%c*} -> expected aaab, got \n${!x/a*b/d} -> expected dcc, got \n${!p@P} -> expected $ , got \nok\n'

stdout:
${!a[1]} -> expected xx, got 
${!b[1]} -> expected asdf, got 
${!y:-foo} -> expected foo, got 
${!x:-foo} -> expected aaabcc, got 
${!x:?oops} -> expected aaabcc, got 
${!x:+foo} -> expected foo, got 
${!x:2} -> expected abcc, got 
${!x:2:2} -> expected ab, got 
${!x#*a} -> expected aabcc, got 
${!x%%c*} -> expected aaab, got 
${!x/a*b/d} -> expected dcc, got 
${!p@P} -> expected $ , got 
ok
stderr:
(eval):1: bad substitution
(eval):1: bad substitution
(eval):1: bad substitution
(eval):1: bad substitution
(eval):1: bad substitution
(eval):1: bad substitution
(eval):1: bad substitution
(eval):1: bad substitution
(eval):1: bad substitution
(eval):1: bad substitution
(eval):1: bad substitution
(eval):1: bad substitution
(eval):1: bad substitution
mksh12 Indirect expansion, THEN suffix operators

[mksh stdout] Expected 'ok\n', got '${!a[1]} -> expected xx, got a[1]\n${!b[1]} -> expected asdf, got b[1]\n${!y:-foo} -> expected foo, got y\n${!x:-foo} -> expected aaabcc, got x\n${!x:?oops} -> expected aaabcc, got x\n${!y:+foo} -> expected , got foo\n${!x:2} -> expected abcc, got \n${!x:2:2} -> expected ab, got \n${!x#*a} -> expected aabcc, got xx\n${!x%%c*} -> expected aaab, got xx\n${!x/a*b/d} -> expected dcc, got xx\n${!p@P} -> expected $ , got p\nok\n'

stdout:
${!a[1]} -> expected xx, got a[1]
${!b[1]} -> expected asdf, got b[1]
${!y:-foo} -> expected foo, got y
${!x:-foo} -> expected aaabcc, got x
${!x:?oops} -> expected aaabcc, got x
${!y:+foo} -> expected , got foo
${!x:2} -> expected abcc, got 
${!x:2:2} -> expected ab, got 
${!x#*a} -> expected aabcc, got xx
${!x%%c*} -> expected aaab, got xx
${!x/a*b/d} -> expected dcc, got xx
${!p@P} -> expected $ , got p
ok
stderr:
ksh12 Indirect expansion, THEN suffix operators

[ksh stdout] Expected 'ok\n', got 'bad success: ${!#x}\nbad success: ${!#a[@]}\n${!a[1]} -> expected xx, got a[1]\n${!b[1]} -> expected asdf, got b[1]\n${!y:-foo} -> expected foo, got \n${!x:-foo} -> expected aaabcc, got \n${!x:?oops} -> expected aaabcc, got \n${!x:+foo} -> expected foo, got \n${!x:2} -> expected abcc, got \n${!x:2:2} -> expected ab, got \n${!x#*a} -> expected aabcc, got \n${!x%%c*} -> expected aaab, got \n${!x/a*b/d} -> expected dcc, got \n${!p@P} -> expected $ , got \nok\n'

stdout:
bad success: ${!#x}
bad success: ${!#a[@]}
${!a[1]} -> expected xx, got a[1]
${!b[1]} -> expected asdf, got b[1]
${!y:-foo} -> expected foo, got 
${!x:-foo} -> expected aaabcc, got 
${!x:?oops} -> expected aaabcc, got 
${!x:+foo} -> expected foo, got 
${!x:2} -> expected abcc, got 
${!x:2:2} -> expected ab, got 
${!x#*a} -> expected aabcc, got 
${!x%%c*} -> expected aaab, got 
${!x/a*b/d} -> expected dcc, got 
${!p@P} -> expected $ , got 
ok
stderr:
E: ksh: ${!y:-foo}: bad substitution
E: ksh: ${!x:-foo}: bad substitution
E: ksh: ${!x:?oops}: bad substitution
E: ksh: ${!y:+foo}: bad substitution
E: ksh: ${!x:+foo}: bad substitution
E: ksh: ${!x: 2}: bad substitution
E: ksh: ${!x: 2:2}: bad substitution
E: ksh: ${!x#*a}: bad substitution
E: ksh: ${!x%%c*}: bad substitution
E: ksh: ${!x/a*b/d}: bad substitution
E: ksh: ${!p@P}: bad substitution
toysh12 Indirect expansion, THEN suffix operators

[toysh stdout] Expected 'ok\n', got 'bad success: ${!!xd}\nbad success: ${!!x*}\n'
[toysh status] Expected 0, got 2

stdout:
bad success: ${!!xd}
bad success: ${!!x*}
stderr:
main: line 22: sh: syntax error: asdf
sush12 Indirect expansion, THEN suffix operators

[sush stdout] Expected 'ok\n', got '${!x:2} -> expected abcc, got \n${!x:2:2} -> expected ab, got \n${!p@P} -> expected $ , got \nok\n'

stdout:
${!x:2} -> expected abcc, got 
${!x:2:2} -> expected ab, got 
${!p@P} -> expected $ , got 
ok
stderr:
dash13 var ref OF array var -- silent a[0] decay

[dash stdout] Expected 'first=\nfirst=zzz\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash13 var ref OF array var -- silent a[0] decay

[ash stdout] Expected 'first=\nfirst=zzz\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh13 var ref OF array var -- silent a[0] decay

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

stdout:
stderr: 
zsh: bad substitution
mksh13 var ref OF array var -- silent a[0] decay

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

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh13 var ref OF array var -- silent a[0] decay

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

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
toysh13 var ref OF array var -- silent a[0] decay

[toysh stdout] Expected 'first=\nfirst=zzz\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: )
dash14 array ref

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

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash14 array ref

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

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh14 array ref

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

stdout:
stderr: 
zsh: bad substitution
mksh14 array ref

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

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh14 array ref

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

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
toysh14 array ref

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

stdout:
stderr: 
main: line 1: sh: syntax error: )
bash15 array ref with strict_array

stdout:
ale
stderr:
bash: line 1: shopt: strict_array: invalid shell option name
dash15 array ref with strict_array

[dash status] Expected 1, got 2

stdout:
stderr: 
dash: 1: shopt: not found
dash: 3: Syntax error: "(" unexpected
ash15 array ref with strict_array

[ash status] Expected 1, got 2

stdout:
stderr: 
ash: shopt: not found
ash: syntax error: unexpected "("
toysh15 array ref with strict_array

[toysh status] Expected 1, got 2

stdout:
stderr: 
sh: shopt: No such file or directory
main: line 3: sh: syntax error: )
sush15 array ref with strict_array

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

stdout:
ale
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: shopt: strict_array: not supported yet
brush15 array ref with strict_array

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

stdout:
ale
stderr:
shopt: strict_array: invalid shell option name
dash16 var ref TO array var

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

stdout:
stderr: 
dash: 1: shopt: not found
dash: 3: Syntax error: "(" unexpected
ash16 var ref TO array var

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

stdout:
stderr: 
ash: shopt: not found
ash: syntax error: unexpected "("
zsh16 var ref TO array var

[zsh stdout] Expected 'ale\nale bean\n', got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: command not found: shopt
zsh: bad substitution
mksh16 var ref TO array var

[mksh stdout] Expected 'ale\nale bean\n', got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: shopt: not found
mksh: <stdin>[3]: syntax error: '(' unexpected
ksh16 var ref TO array var

[ksh stdout] Expected 'ale\nale bean\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: shopt: inaccessible or not found
E: ksh: <stdin>[3]: syntax error: unexpected '('
toysh16 var ref TO array var

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

stdout:
stderr: 
sh: shopt: No such file or directory
main: line 3: sh: syntax error: )
dash17 var ref TO array var, with subscripts

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

stdout:
stderr: 
dash: 2: Bad substitution
ash17 var ref TO array var, with subscripts

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

stdout:
stderr: 
ash: syntax error: bad substitution
zsh17 var ref TO array var, with subscripts

[zsh stdout] Expected "['']\n['x']\n['z']\n['x', 'y', 'z']\n['x y z']\n" Got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
f:1: bad substitution
mksh17 var ref TO array var, with subscripts

[mksh stdout] Expected "['']\n['x']\n['z']\n['x', 'y', 'z']\n['x y z']\n" Got "['1']\n['1']\n['1']\n['1']\n['1']\n"

stdout:
['1']
['1']
['1']
['1']
['1']
stderr:
ksh17 var ref TO array var, with subscripts

[ksh stdout] Expected "['']\n['x']\n['z']\n['x', 'y', 'z']\n['x y z']\n" Got "['1']\n['1']\n['1']\n['1']\n['1']\n"

stdout:
['1']
['1']
['1']
['1']
['1']
stderr:
toysh17 var ref TO array var, with subscripts

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

stdout:
stderr: 
main: line 4: sh: nonexistent[0]: bad substitution
main: line 5: sh: syntax error: x
sush17 var ref TO array var, with subscripts

[sush stdout] Expected "['']\n['x']\n['z']\n['x', 'y', 'z']\n['x y z']\n" Got "['']\n['x']\n['z']\n['x y z']\n['x y z']\n"

stdout:
['']
['x']
['z']
['x y z']
['x y z']
stderr:
dash18 var ref TO assoc array a[key]

[dash stdout] Expected 'ref=\nref_SUB=bean\nref_SUB_QUOTED=bean\nref_SUB_BAD=\n' Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: shopt: not found
dash: 3: Syntax error: "(" unexpected
ash18 var ref TO assoc array a[key]

[ash stdout] Expected 'ref=\nref_SUB=bean\nref_SUB_QUOTED=bean\nref_SUB_BAD=\n' Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: shopt: not found
ash: syntax error: unexpected "("
zsh18 var ref TO assoc array a[key]

[zsh stdout] Expected 'ref=\nref_SUB=bean\nref_SUB_QUOTED=bean\nref_SUB_BAD=\n' Got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: command not found: shopt
zsh: no matches found: [ale]=bean
zsh: bad substitution
mksh18 var ref TO assoc array a[key]

[mksh stdout] Expected 'ref=\nref_SUB=bean\nref_SUB_QUOTED=bean\nref_SUB_BAD=\n' Got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: shopt: not found
mksh: <stdin>[3]: syntax error: '(' unexpected
ksh18 var ref TO assoc array a[key]

[ksh stdout] Expected 'ref=\nref_SUB=bean\nref_SUB_QUOTED=bean\nref_SUB_BAD=\n' Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: shopt: inaccessible or not found
E: ksh: <stdin>[3]: syntax error: unexpected '('
toysh18 var ref TO assoc array a[key]

[toysh stdout] Expected 'ref=\nref_SUB=bean\nref_SUB_QUOTED=bean\nref_SUB_BAD=\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
sh: shopt: No such file or directory
main: line 3: sh: syntax error: )
sush18 var ref TO assoc array a[key]

[sush stdout] Expected 'ref=\nref_SUB=bean\nref_SUB_QUOTED=bean\nref_SUB_BAD=\n' Got 'ref=dip\nref_SUB=dip\nref_SUB_QUOTED=dip\nref_SUB_BAD=dip\n'

stdout:
ref=dip
ref_SUB=dip
ref_SUB_QUOTED=dip
ref_SUB_BAD=dip
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: shopt: compat_array: not supported yet
dash19 var ref TO array with arbitrary subscripts

[dash stdout] Expected 'works: a[1]\nworks: a[$b]\nworks: a[${c:-1}]\nworks: a[$(echo 1)]\nworks: a[$(( 3 - 2 ))]\n' Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: shopt: not found
dash: 9: Syntax error: "(" unexpected
ash19 var ref TO array with arbitrary subscripts

[ash stdout] Expected 'works: a[1]\nworks: a[$b]\nworks: a[${c:-1}]\nworks: a[$(echo 1)]\nworks: a[$(( 3 - 2 ))]\n' Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: shopt: not found
ash: syntax error: unexpected "("
zsh19 var ref TO array with arbitrary subscripts

[zsh stdout] Expected 'works: a[1]\nworks: a[$b]\nworks: a[${c:-1}]\nworks: a[$(echo 1)]\nworks: a[$(( 3 - 2 ))]\n' Got ''

stdout:
stderr: 
zsh: command not found: shopt
f:1: bad substitution
f:1: bad substitution
f:1: bad substitution
f:1: bad substitution
f:1: bad substitution
f:1: bad substitution
f:1: bad substitution
f:1: bad substitution
f:1: bad substitution
f:1: bad substitution
mksh19 var ref TO array with arbitrary subscripts

[mksh stdout] Expected 'works: a[1]\nworks: a[$b]\nworks: a[${c:-1}]\nworks: a[$(echo 1)]\nworks: a[$(( 3 - 2 ))]\n' Got ''

stdout:
stderr: 
mksh: <stdin>[1]: shopt: not found
ksh19 var ref TO array with arbitrary subscripts

[ksh stdout] Expected 'works: a[1]\nworks: a[$b]\nworks: a[${c:-1}]\nworks: a[$(echo 1)]\nworks: a[$(( 3 - 2 ))]\n' Got ''

stdout:
stderr: 
E: ksh: <stdin>[1]: shopt: inaccessible or not found
toysh19 var ref TO array with arbitrary subscripts

[toysh stdout] Expected 'works: a[1]\nworks: a[$b]\nworks: a[${c:-1}]\nworks: a[$(echo 1)]\nworks: a[$(( 3 - 2 ))]\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
sh: shopt: No such file or directory
main: line 9: sh: syntax error: x
dash20 Bizarre tilde expansion in array index

[dash status] Expected 1, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash20 Bizarre tilde expansion in array index

[ash status] Expected 1, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
mksh20 Bizarre tilde expansion in array index

[mksh status] Expected 1, got 0

stdout:
ref
stderr:
ksh20 Bizarre tilde expansion in array index

[ksh status] Expected 1, got 0

stdout:
ref
stderr:
toysh20 Bizarre tilde expansion in array index

[toysh status] Expected 1, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: x
dash21 Indirect expansion TO fancy expansion features bash disallows

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

stdout:
stderr: 
dash: 8: Syntax error: "(" unexpected
ash21 Indirect expansion TO fancy expansion features bash disallows

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

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh21 Indirect expansion TO fancy expansion features bash disallows

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

stdout:
stderr: 
zsh: no matches found: [k]=r
mksh21 Indirect expansion TO fancy expansion features bash disallows

[mksh stdout] Expected 'done\n', got '!x x\n!a[0] a[0]\n!a@ a\ndone\n'

stdout:
!x x
!a[0] a[0]
!a@ a
done
stderr:
mksh: <stdin>[9]: declare: not found
mksh: missing ]
mksh: missing ]
ksh21 Indirect expansion TO fancy expansion features bash disallows

[ksh stdout] Expected 'done\n', got '!x x\n!a[0] a[0]\n!a@ \ndone\n'

stdout:
!x x
!a[0] a[0]
!a@ 
done
stderr:
E: ksh: <stdin>[9]: declare: inaccessible or not found
E: ksh: missing ]
E: ksh: missing ]
E: ksh: ${!a@}: bad substitution
toysh21 Indirect expansion TO fancy expansion features bash disallows

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

stdout:
stderr: 
main: line 8: sh: syntax error: x
sush21 Indirect expansion TO fancy expansion features bash disallows

[sush stdout] Expected 'done\n', got 'a[0 x\naa[k s\ndone\n'

stdout:
a[0 x
aa[k s
done
stderr:
dash22 Bad var ref

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

stdout:
stderr: 
dash: 2: Bad substitution
ash22 Bad var ref

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

stdout:
stderr: 
ash: syntax error: bad substitution
zsh22 Bad var ref

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

stdout:
stderr: 
zsh: bad substitution
mksh22 Bad var ref

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

stdout:
ref a
status=0
stderr:
ksh22 Bad var ref

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

stdout:
ref a
status=0
stderr:
dash23 Bad var ref 2

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

stdout:
stderr: 
dash: 2: Bad substitution
ash23 Bad var ref 2

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

stdout:
stderr: 
ash: syntax error: bad substitution
zsh23 Bad var ref 2

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

stdout:
stderr: 
zsh: bad substitution
mksh23 Bad var ref 2

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

stdout:
ref b
status=0
stderr:
ksh23 Bad var ref 2

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

stdout:
ref b
status=0
stderr:
dash24 ${!OPTIND} (used by bash completion

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

stdout:
stderr: 
dash: 2: Bad substitution
ash24 ${!OPTIND} (used by bash completion

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

stdout:
stderr: 
ash: syntax error: bad substitution
zsh24 ${!OPTIND} (used by bash completion

[zsh stdout] Expected 'a\nx\ny\n', got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: bad substitution
mksh24 ${!OPTIND} (used by bash completion

[mksh stdout] Expected 'a\nx\ny\n', got 'OPTIND\nOPTIND\nOPTIND\n'

stdout:
OPTIND
OPTIND
OPTIND
stderr:
ksh24 ${!OPTIND} (used by bash completion

[ksh stdout] Expected 'a\nx\ny\n', got 'OPTIND\nOPTIND\nOPTIND\n'

stdout:
OPTIND
OPTIND
OPTIND
stderr:
toysh24 ${!OPTIND} (used by bash completion

[toysh stdout] Expected 'a\nx\ny\n', got '\nx\nx\n'

stdout:
x
x
stderr:
set: bad --
bash25 var ref doesn't need cycle detection

stdout:
cycle=x
cycle=
stderr:
bash: line 7: warning: a: circular name reference
dash25 var ref doesn't need cycle detection

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

stdout:
stderr: 
dash: 3: Bad substitution
ash25 var ref doesn't need cycle detection

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

stdout:
stderr: 
ash: syntax error: bad substitution
zsh25 var ref doesn't need cycle detection

[zsh stdout] Expected 'cycle=x\n', got ''

stdout:
stderr: 
zsh: bad substitution
ksh25 var ref doesn't need cycle detection

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

stdout:
cycle=x
cycle=
stderr:
E: ksh: <stdin>[6]: typeset: b: expression recurses on parameter
toysh25 var ref doesn't need cycle detection

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

stdout:
cycle=x
cycle=
stderr:
sh: typeset: No such file or directory
sh: typeset: No such file or directory
sush25 var ref doesn't need cycle detection

[sush stdout] Expected 'cycle=x\n', got 'cycle=x\ncycle=b\n'
[sush status] Expected 1, got 0

stdout:
cycle=x
cycle=b
stderr:
brush25 var ref doesn't need cycle detection

[brush stdout] Expected 'cycle=x\n', got 'cycle=x\ncycle=b\n'
[brush status] Expected 1, got 0

stdout:
cycle=x
cycle=b
stderr:
bash26 Var Ref Code Injection $(tee PWNED)

stdout:
42
PWNED
0
stderr:
dash26 Var Ref Code Injection $(tee PWNED)

[dash status] Expected 1, got 2

stdout:
stderr: 
dash: 1: typeset: not found
dash: 2: Syntax error: "(" unexpected
ash26 Var Ref Code Injection $(tee PWNED)

[ash status] Expected 1, got 2

stdout:
stderr: 
ash: typeset: not found
ash: syntax error: unexpected "("
mksh26 Var Ref Code Injection $(tee PWNED)

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

stdout:
x
NOPE
stderr:
ksh26 Var Ref Code Injection $(tee PWNED)

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

stdout:
x
NOPE
stderr:
toysh26 Var Ref Code Injection $(tee PWNED)

[toysh status] Expected 1, got 2

stdout:
stderr: 
sh: typeset: No such file or directory
main: line 2: sh: syntax error: 42
sush26 Var Ref Code Injection $(tee PWNED)

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

stdout:
42
PWNED
0
stderr:
brush26 Var Ref Code Injection $(tee PWNED)

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

stdout:
42
PWNED
0
stderr:
dash27 ${!array_ref:-set} and ${!array_ref:=assign}

[dash stdout] Expected "==== check ====\n['', '', '']\n['', '', '']\n==== assign ====\n['', '', '']\n['', '', '']\n['', '', '']\n['', '', '']\n" Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 2: Syntax error: "(" unexpected
ash27 ${!array_ref:-set} and ${!array_ref:=assign}

[ash stdout] Expected "==== check ====\n['', '', '']\n['', '', '']\n==== assign ====\n['', '', '']\n['', '', '']\n['', '', '']\n['', '', '']\n" Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh27 ${!array_ref:-set} and ${!array_ref:=assign}

[zsh stdout] Expected "==== check ====\n['', '', '']\n['', '', '']\n==== assign ====\n['', '', '']\n['', '', '']\n['', '', '']\n['', '', '']\n" Got '==== check ====\n'
[zsh status] Expected 0, got 1

stdout:
==== check ====
stderr:
zsh: bad substitution
mksh27 ${!array_ref:-set} and ${!array_ref:=assign}

[mksh stdout] Expected "==== check ====\n['', '', '']\n['', '', '']\n==== assign ====\n['', '', '']\n['', '', '']\n['', '', '']\n['', '', '']\n" Got "==== check ====\n['ref']\n['', '', '']\n==== assign ====\n"
[mksh status] Expected 0, got 1

stdout:
==== check ====
['ref']
['', '', '']
==== assign ====
stderr:
mksh: <stdin>[11]: ${!ref:=assign}: bad substitution
ksh27 ${!array_ref:-set} and ${!array_ref:=assign}

[ksh stdout] Expected "==== check ====\n['', '', '']\n['', '', '']\n==== assign ====\n['', '', '']\n['', '', '']\n['', '', '']\n['', '', '']\n" Got '==== check ====\n'
[ksh status] Expected 0, got 1

stdout:
==== check ====
stderr:
E: ksh: <stdin>[6]: ${!ref:-set}: bad substitution
toysh27 ${!array_ref:-set} and ${!array_ref:=assign}

[toysh stdout] Expected "==== check ====\n['', '', '']\n['', '', '']\n==== assign ====\n['', '', '']\n['', '', '']\n['', '', '']\n['', '', '']\n" Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 2: sh: syntax error: ''
sush27 ${!array_ref:-set} and ${!array_ref:=assign}

[sush stdout] Expected "==== check ====\n['', '', '']\n['', '', '']\n==== assign ====\n['', '', '']\n['', '', '']\n['', '', '']\n['', '', '']\n" Got "==== check ====\n[' ']\n['', '', '']\n==== assign ====\n[' ']\n[' ']\n['', '', '']\n['', '', '']\n"

stdout:
==== check ====
['  ']
['', '', '']
==== assign ====
['  ']
['  ']
['', '', '']
['', '', '']
stderr:
brush27 ${!array_ref:-set} and ${!array_ref:=assign}

[brush stdout] Expected "==== check ====\n['', '', '']\n['', '', '']\n==== assign ====\n['', '', '']\n['', '', '']\n['', '', '']\n['', '', '']\n" Got "==== check ====\n['set']\n['set']\n==== assign ====\n['assign']\n['']\n['', '', '']\n"

stdout:
==== check ====
['set']
['set']
==== assign ====
['assign']
['']
['', '', '']
stderr:
ERROR error: cannot assign in this way
dash28 Array indirect expansion with suffix operators

[dash stdout] Expected "==== v1 ====\n['lue']\n['al']\n['value']\n['set']\n['value']\nv1=value\n==== v2 ====\n['']\n['']\n['empty']\n['']\n['assign']\nv2=assign\n==== a1 ====\n['']\n['']\n['empty']\n['']\n['assign']\n['assign']\n==== a2[0] ====\n['ement']\n['le']\n['element']\n['set']\n['element']\n['element']\n==== a3[@] ====\n['3']\n['2', '3']\n['1', '2', '3']\n['set']\n['1', '2', '3']\n['1', '2', '3']\n" Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash28 Array indirect expansion with suffix operators

[ash stdout] Expected "==== v1 ====\n['lue']\n['al']\n['value']\n['set']\n['value']\nv1=value\n==== v2 ====\n['']\n['']\n['empty']\n['']\n['assign']\nv2=assign\n==== a1 ====\n['']\n['']\n['empty']\n['']\n['assign']\n['assign']\n==== a2[0] ====\n['ement']\n['le']\n['element']\n['set']\n['element']\n['element']\n==== a3[@] ====\n['3']\n['2', '3']\n['1', '2', '3']\n['set']\n['1', '2', '3']\n['1', '2', '3']\n" Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh28 Array indirect expansion with suffix operators

[zsh stdout] Expected "==== v1 ====\n['lue']\n['al']\n['value']\n['set']\n['value']\nv1=value\n==== v2 ====\n['']\n['']\n['empty']\n['']\n['assign']\nv2=assign\n==== a1 ====\n['']\n['']\n['empty']\n['']\n['assign']\n['assign']\n==== a2[0] ====\n['ement']\n['le']\n['element']\n['set']\n['element']\n['element']\n==== a3[@] ====\n['3']\n['2', '3']\n['1', '2', '3']\n['set']\n['1', '2', '3']\n['1', '2', '3']\n" Got '==== v1 ====\n'
[zsh status] Expected 0, got 1

stdout:
==== v1 ====
stderr:
zsh: no matches found: [dummy]=v1
test-suffixes:2: bad math expression: operand expected at `'dummy''
mksh28 Array indirect expansion with suffix operators

[mksh stdout] Expected "==== v1 ====\n['lue']\n['al']\n['value']\n['set']\n['value']\nv1=value\n==== v2 ====\n['']\n['']\n['empty']\n['']\n['assign']\nv2=assign\n==== a1 ====\n['']\n['']\n['empty']\n['']\n['assign']\n['assign']\n==== a2[0] ====\n['ement']\n['le']\n['element']\n['set']\n['element']\n['element']\n==== a3[@] ====\n['3']\n['2', '3']\n['1', '2', '3']\n['set']\n['1', '2', '3']\n['1', '2', '3']\n" Got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh28 Array indirect expansion with suffix operators

[ksh stdout] Expected "==== v1 ====\n['lue']\n['al']\n['value']\n['set']\n['value']\nv1=value\n==== v2 ====\n['']\n['']\n['empty']\n['']\n['assign']\nv2=assign\n==== a1 ====\n['']\n['']\n['empty']\n['']\n['assign']\n['assign']\n==== a2[0] ====\n['ement']\n['le']\n['element']\n['set']\n['element']\n['element']\n==== a3[@] ====\n['3']\n['2', '3']\n['1', '2', '3']\n['set']\n['1', '2', '3']\n['1', '2', '3']\n" Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
toysh28 Array indirect expansion with suffix operators

[toysh stdout] Expected "==== v1 ====\n['lue']\n['al']\n['value']\n['set']\n['value']\nv1=value\n==== v2 ====\n['']\n['']\n['empty']\n['']\n['assign']\nv2=assign\n==== a1 ====\n['']\n['']\n['empty']\n['']\n['assign']\n['assign']\n==== a2[0] ====\n['ement']\n['le']\n['element']\n['set']\n['element']\n['element']\n==== a3[@] ====\n['3']\n['2', '3']\n['1', '2', '3']\n['set']\n['1', '2', '3']\n['1', '2', '3']\n" Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: )
sush28 Array indirect expansion with suffix operators

[sush stdout] Expected "==== v1 ====\n['lue']\n['al']\n['value']\n['set']\n['value']\nv1=value\n==== v2 ====\n['']\n['']\n['empty']\n['']\n['assign']\nv2=assign\n==== a1 ====\n['']\n['']\n['empty']\n['']\n['assign']\n['assign']\n==== a2[0] ====\n['ement']\n['le']\n['element']\n['set']\n['element']\n['element']\n==== a3[@] ====\n['3']\n['2', '3']\n['1', '2', '3']\n['set']\n['1', '2', '3']\n['1', '2', '3']\n" Got "==== ====\nv1=value\nv2=\n[]\n['element']\n['1', '2', '3']\n"

stdout:
====  ====
v1=value
v2=
[]
['element']
['1', '2', '3']
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: 'dummy': syntax error: operand expected (error token is "'dummy'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: function: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: 'dummy': syntax error: operand expected (error token is "'dummy'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: `': invalid name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: `': invalid name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: `': invalid name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 8: `': invalid name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: `': invalid name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 11: Unexpected token: }

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 13: test-suffixes: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 17: test-suffixes: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 21: test-suffixes: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 25: test-suffixes: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 29: test-suffixes: command not found
brush28 Array indirect expansion with suffix operators

[brush stdout] Expected "==== v1 ====\n['lue']\n['al']\n['value']\n['set']\n['value']\nv1=value\n==== v2 ====\n['']\n['']\n['empty']\n['']\n['assign']\nv2=assign\n==== a1 ====\n['']\n['']\n['empty']\n['']\n['assign']\n['assign']\n==== a2[0] ====\n['ement']\n['le']\n['element']\n['set']\n['element']\n['element']\n==== a3[@] ====\n['3']\n['2', '3']\n['1', '2', '3']\n['set']\n['1', '2', '3']\n['1', '2', '3']\n" Got "==== v1 ====\n['${!ref[@]:2}']\n['${!ref[@]:1:2}']\n['value']\n['set']\n['value']\nv1=value\n==== v2 ====\n['${!ref[@]:2}']\n['${!ref[@]:1:2}']\n['empty']\n['']\nv2=\n==== a1 ====\n['${!ref[@]:2}']\n['${!ref[@]:1:2}']\n['empty']\n['']\n[]\n==== a2[0] ====\n['${!ref[@]:2}']\n['${!ref[@]:1:2}']\n['element']\n['set']\n['element']\n['element']\n==== a3[@] ====\n['${!ref[@]:2}']\n['${!ref[@]:1:2}']\n['1', '2', '3']\n['set']\n['1', '2', '3']\n['1', '2', '3']\n"

stdout:
==== v1 ====
['${!ref[@]:2}']
['${!ref[@]:1:2}']
['value']
['set']
['value']
v1=value
==== v2 ====
['${!ref[@]:2}']
['${!ref[@]:1:2}']
['empty']
['']
v2=
==== a1 ====
['${!ref[@]:2}']
['${!ref[@]:1:2}']
['empty']
['']
[]
==== a2[0] ====
['${!ref[@]:2}']
['${!ref[@]:1:2}']
['element']
['set']
['element']
['element']
==== a3[@] ====
['${!ref[@]:2}']
['${!ref[@]:1:2}']
['1', '2', '3']
['set']
['1', '2', '3']
['1', '2', '3']
stderr:
ERROR error: cannot assign in this way
ERROR error: cannot assign in this way
dash29 Array indirect expansion with replacements

[dash stdout] Expected "==== v1 ====\n['alue']\n['valu']\n['vlu']\n['vxlux']\n==== v2 ====\n['']\n['']\n['']\n['']\n==== a1 ====\n['']\n['']\n['']\n['']\n==== a2[0] ====\n['lement']\n['elemen']\n['lmnt']\n['xlxmxnt']\n==== a3[@] ====\n['', '', '']\n['', '', '']\n['1', '2', '3']\n['1', '2', '3']\n" Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash29 Array indirect expansion with replacements

[ash stdout] Expected "==== v1 ====\n['alue']\n['valu']\n['vlu']\n['vxlux']\n==== v2 ====\n['']\n['']\n['']\n['']\n==== a1 ====\n['']\n['']\n['']\n['']\n==== a2[0] ====\n['lement']\n['elemen']\n['lmnt']\n['xlxmxnt']\n==== a3[@] ====\n['', '', '']\n['', '', '']\n['1', '2', '3']\n['1', '2', '3']\n" Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh29 Array indirect expansion with replacements

[zsh stdout] Expected "==== v1 ====\n['alue']\n['valu']\n['vlu']\n['vxlux']\n==== v2 ====\n['']\n['']\n['']\n['']\n==== a1 ====\n['']\n['']\n['']\n['']\n==== a2[0] ====\n['lement']\n['elemen']\n['lmnt']\n['xlxmxnt']\n==== a3[@] ====\n['', '', '']\n['', '', '']\n['1', '2', '3']\n['1', '2', '3']\n" Got '==== v1 ====\n'
[zsh status] Expected 0, got 1

stdout:
==== v1 ====
stderr:
zsh: no matches found: [dummy]=v1
test-rep:2: bad math expression: operand expected at `'dummy''
mksh29 Array indirect expansion with replacements

[mksh stdout] Expected "==== v1 ====\n['alue']\n['valu']\n['vlu']\n['vxlux']\n==== v2 ====\n['']\n['']\n['']\n['']\n==== a1 ====\n['']\n['']\n['']\n['']\n==== a2[0] ====\n['lement']\n['elemen']\n['lmnt']\n['xlxmxnt']\n==== a3[@] ====\n['', '', '']\n['', '', '']\n['1', '2', '3']\n['1', '2', '3']\n" Got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh29 Array indirect expansion with replacements

[ksh stdout] Expected "==== v1 ====\n['alue']\n['valu']\n['vlu']\n['vxlux']\n==== v2 ====\n['']\n['']\n['']\n['']\n==== a1 ====\n['']\n['']\n['']\n['']\n==== a2[0] ====\n['lement']\n['elemen']\n['lmnt']\n['xlxmxnt']\n==== a3[@] ====\n['', '', '']\n['', '', '']\n['1', '2', '3']\n['1', '2', '3']\n" Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
toysh29 Array indirect expansion with replacements

[toysh stdout] Expected "==== v1 ====\n['alue']\n['valu']\n['vlu']\n['vxlux']\n==== v2 ====\n['']\n['']\n['']\n['']\n==== a1 ====\n['']\n['']\n['']\n['']\n==== a2[0] ====\n['lement']\n['elemen']\n['lmnt']\n['xlxmxnt']\n==== a3[@] ====\n['', '', '']\n['', '', '']\n['1', '2', '3']\n['1', '2', '3']\n" Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: )
sush29 Array indirect expansion with replacements

[sush stdout] Expected "==== v1 ====\n['alue']\n['valu']\n['vlu']\n['vxlux']\n==== v2 ====\n['']\n['']\n['']\n['']\n==== a1 ====\n['']\n['']\n['']\n['']\n==== a2[0] ====\n['lement']\n['elemen']\n['lmnt']\n['xlxmxnt']\n==== a3[@] ====\n['', '', '']\n['', '', '']\n['1', '2', '3']\n['1', '2', '3']\n" Got '==== ====\n'
[sush status] Expected 0, got 127

stdout:
====  ====
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: 'dummy': syntax error: operand expected (error token is "'dummy'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: function: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: 'dummy': syntax error: operand expected (error token is "'dummy'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: `': invalid name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: `': invalid name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: `': invalid name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 8: `': invalid name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 10: Unexpected token: }

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 12: test-rep: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 15: test-rep: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 18: test-rep: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 21: test-rep: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 24: test-rep: command not found
brush29 Array indirect expansion with replacements

[brush stdout] Expected "==== v1 ====\n['alue']\n['valu']\n['vlu']\n['vxlux']\n==== v2 ====\n['']\n['']\n['']\n['']\n==== a1 ====\n['']\n['']\n['']\n['']\n==== a2[0] ====\n['lement']\n['elemen']\n['lmnt']\n['xlxmxnt']\n==== a3[@] ====\n['', '', '']\n['', '', '']\n['1', '2', '3']\n['1', '2', '3']\n" Got "==== v1 ====\n['alue']\n['valu']\n['${!ref[@]//[a-f]}']\n['${!ref[@]//[a-f]/x}']\n==== v2 ====\n['']\n['']\n['${!ref[@]//[a-f]}']\n['${!ref[@]//[a-f]/x}']\n==== a1 ====\n['']\n['']\n['${!ref[@]//[a-f]}']\n['${!ref[@]//[a-f]/x}']\n==== a2[0] ====\n['lement']\n['elemen']\n['${!ref[@]//[a-f]}']\n['${!ref[@]//[a-f]/x}']\n==== a3[@] ====\n['', '', '']\n['', '', '']\n['${!ref[@]//[a-f]}']\n['${!ref[@]//[a-f]/x}']\n"

stdout:
==== v1 ====
['alue']
['valu']
['${!ref[@]//[a-f]}']
['${!ref[@]//[a-f]/x}']
==== v2 ====
['']
['']
['${!ref[@]//[a-f]}']
['${!ref[@]//[a-f]/x}']
==== a1 ====
['']
['']
['${!ref[@]//[a-f]}']
['${!ref[@]//[a-f]/x}']
==== a2[0] ====
['lement']
['elemen']
['${!ref[@]//[a-f]}']
['${!ref[@]//[a-f]/x}']
==== a3[@] ====
['', '', '']
['', '', '']
['${!ref[@]//[a-f]}']
['${!ref[@]//[a-f]/x}']
stderr:
bash30 Array indirect expansion with @? conversion

stdout:
==== v1 ====
["'value'"]
['value']
['']
==== v2 ====
["''"]
['']
['']
==== a1 ====
['']
['']
['a']
==== a2[0] ====
["'element'"]
['element']
['a']
==== a3[@] ====
["'1'", "'2'", "'3'"]
['1', '2', '3']
['a', 'a', 'a']
stderr:
dash30 Array indirect expansion with @? conversion

[dash stdout] Expected '==== v1 ====\n[\'value\']\n[\'value\']\n[\'\']\n==== v2 ====\n["\'\'"]\n[\'\']\n[\'\']\n==== a1 ====\n[\'\']\n[\'\']\n[\'a\']\n==== a2[0] ====\n[\'element\']\n[\'element\']\n[\'a\']\n==== a3[@] ====\n[\'1\', \'2\', \'3\']\n[\'1\', \'2\', \'3\']\n[\'a\', \'a\', \'a\']\n' Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash30 Array indirect expansion with @? conversion

[ash stdout] Expected '==== v1 ====\n[\'value\']\n[\'value\']\n[\'\']\n==== v2 ====\n["\'\'"]\n[\'\']\n[\'\']\n==== a1 ====\n[\'\']\n[\'\']\n[\'a\']\n==== a2[0] ====\n[\'element\']\n[\'element\']\n[\'a\']\n==== a3[@] ====\n[\'1\', \'2\', \'3\']\n[\'1\', \'2\', \'3\']\n[\'a\', \'a\', \'a\']\n' Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh30 Array indirect expansion with @? conversion

[zsh stdout] Expected '==== v1 ====\n[\'value\']\n[\'value\']\n[\'\']\n==== v2 ====\n["\'\'"]\n[\'\']\n[\'\']\n==== a1 ====\n[\'\']\n[\'\']\n[\'a\']\n==== a2[0] ====\n[\'element\']\n[\'element\']\n[\'a\']\n==== a3[@] ====\n[\'1\', \'2\', \'3\']\n[\'1\', \'2\', \'3\']\n[\'a\', \'a\', \'a\']\n' Got '==== v1 ====\n'
[zsh status] Expected 0, got 1

stdout:
==== v1 ====
stderr:
zsh: no matches found: [dummy]=v1
test-op0:2: bad math expression: operand expected at `'dummy''
mksh30 Array indirect expansion with @? conversion

[mksh stdout] Expected '==== v1 ====\n[\'value\']\n[\'value\']\n[\'\']\n==== v2 ====\n["\'\'"]\n[\'\']\n[\'\']\n==== a1 ====\n[\'\']\n[\'\']\n[\'a\']\n==== a2[0] ====\n[\'element\']\n[\'element\']\n[\'a\']\n==== a3[@] ====\n[\'1\', \'2\', \'3\']\n[\'1\', \'2\', \'3\']\n[\'a\', \'a\', \'a\']\n' Got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh30 Array indirect expansion with @? conversion

[ksh stdout] Expected '==== v1 ====\n[\'value\']\n[\'value\']\n[\'\']\n==== v2 ====\n["\'\'"]\n[\'\']\n[\'\']\n==== a1 ====\n[\'\']\n[\'\']\n[\'a\']\n==== a2[0] ====\n[\'element\']\n[\'element\']\n[\'a\']\n==== a3[@] ====\n[\'1\', \'2\', \'3\']\n[\'1\', \'2\', \'3\']\n[\'a\', \'a\', \'a\']\n' Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
toysh30 Array indirect expansion with @? conversion

[toysh stdout] Expected '==== v1 ====\n[\'value\']\n[\'value\']\n[\'\']\n==== v2 ====\n["\'\'"]\n[\'\']\n[\'\']\n==== a1 ====\n[\'\']\n[\'\']\n[\'a\']\n==== a2[0] ====\n[\'element\']\n[\'element\']\n[\'a\']\n==== a3[@] ====\n[\'1\', \'2\', \'3\']\n[\'1\', \'2\', \'3\']\n[\'a\', \'a\', \'a\']\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: )
sush30 Array indirect expansion with @? conversion

[sush stdout] Expected '==== v1 ====\n[\'value\']\n[\'value\']\n[\'\']\n==== v2 ====\n["\'\'"]\n[\'\']\n[\'\']\n==== a1 ====\n[\'\']\n[\'\']\n[\'a\']\n==== a2[0] ====\n[\'element\']\n[\'element\']\n[\'a\']\n==== a3[@] ====\n[\'1\', \'2\', \'3\']\n[\'1\', \'2\', \'3\']\n[\'a\', \'a\', \'a\']\n' Got '==== ====\n'
[sush status] Expected 0, got 127

stdout:
====  ====
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: 'dummy': syntax error: operand expected (error token is "'dummy'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: function: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: 'dummy': syntax error: operand expected (error token is "'dummy'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: `${!ref[@]@Q}': bad substitution
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: `${!ref[@]@P}': bad substitution
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: `${!ref[@]@a}': bad substitution
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: Unexpected token: }

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 11: test-op0: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 14: test-op0: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 17: test-op0: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 20: test-op0: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 23: test-op0: command not found
brush30 Array indirect expansion with @? conversion

[brush stdout] Expected '==== v1 ====\n[\'value\']\n[\'value\']\n[\'\']\n==== v2 ====\n["\'\'"]\n[\'\']\n[\'\']\n==== a1 ====\n[\'\']\n[\'\']\n[\'a\']\n==== a2[0] ====\n[\'element\']\n[\'element\']\n[\'a\']\n==== a3[@] ====\n[\'1\', \'2\', \'3\']\n[\'1\', \'2\', \'3\']\n[\'a\', \'a\', \'a\']\n' Got "==== v1 ====\n['${!ref[@]@Q}']\n['${!ref[@]@P}']\n['${!ref[@]@a}']\n==== v2 ====\n['${!ref[@]@Q}']\n['${!ref[@]@P}']\n['${!ref[@]@a}']\n==== a1 ====\n['${!ref[@]@Q}']\n['${!ref[@]@P}']\n['${!ref[@]@a}']\n==== a2[0] ====\n['${!ref[@]@Q}']\n['${!ref[@]@P}']\n['${!ref[@]@a}']\n==== a3[@] ====\n['${!ref[@]@Q}']\n['${!ref[@]@P}']\n['${!ref[@]@a}']\n"

stdout:
==== v1 ====
['${!ref[@]@Q}']
['${!ref[@]@P}']
['${!ref[@]@a}']
==== v2 ====
['${!ref[@]@Q}']
['${!ref[@]@P}']
['${!ref[@]@a}']
==== a1 ====
['${!ref[@]@Q}']
['${!ref[@]@P}']
['${!ref[@]@a}']
==== a2[0] ====
['${!ref[@]@Q}']
['${!ref[@]@P}']
['${!ref[@]@a}']
==== a3[@] ====
['${!ref[@]@Q}']
['${!ref[@]@P}']
['${!ref[@]@a}']
stderr: