Results for array-assign.test.sh

statusbashdashashzshmkshkshtoyshsushbrushosh
pass 9002771711
ok 0010200001
N-I 00108200000
BUG-2 0001000000
BUG 2000000000
FAIL 0110004104109
total11111111111111111111
casebashdashashzshmkshkshtoyshsushbrushoshdescription
0pass FAIL N-I pass pass pass FAIL FAIL pass pass Indexed LHS without spaces, and +=
detailsdetailsdetailsdetails
1pass FAIL N-I N-I pass pass FAIL pass FAIL FAIL Indexed LHS with spaces
detailsdetailsdetailsdetailsdetailsdetails
2pass FAIL N-I N-I pass pass FAIL pass FAIL FAIL Nested a[i[0]]=0
detailsdetailsdetailsdetailsdetailsdetails
3pass FAIL N-I N-I ok FAIL FAIL pass FAIL FAIL Multiple LHS array words
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
4pass FAIL N-I N-I ok FAIL FAIL pass FAIL FAIL LHS array is protected with shopt -s eval_unsafe_arith, e.g. 'a[$(echo 2)]'
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
5pass FAIL N-I N-I pass pass FAIL pass FAIL FAIL file named a[ is not executed
detailsdetailsdetailsdetailsdetailsdetails
6BUG FAIL N-I BUG-2 pass pass FAIL pass FAIL FAIL More fragments like a[ a[5 a[5 + a[5 + 3]
detailsdetailsdetailsdetailsdetailsdetailsdetails
7BUG FAIL ok pass pass pass pass FAIL FAIL FAIL Are quotes allowed?
detailsdetailsdetailsdetailsdetailsdetails
8pass FAIL N-I N-I N-I FAIL FAIL FAIL FAIL FAIL Tricky parsing - a[ a[0]=1 ]=X a[ a[0]+=1 ]+=X
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
9pass FAIL N-I N-I pass pass FAIL pass FAIL FAIL argv.py a[1 + 2]=
detailsdetailsdetailsdetailsdetailsdetails
10pass FAIL N-I N-I N-I FAIL FAIL FAIL FAIL ok declare builtin doesn't allow spaces
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
35 passed, 4 OK, 20 not implemented, 3 BUG, 48 failed, 0 timeouts, 0 cases skipped
9 failed under osh

Details on runs that didn't PASS

dash0 Indexed LHS without spaces, and +=

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

stdout:
status=127
stderr:
dash: 1: a[1]=x: not found
dash: 3: Bad substitution
ash0 Indexed LHS without spaces, and +=

stdout:
status=127
stderr:
ash: a[1]=x: not found
ash: syntax error: bad substitution
toysh0 Indexed LHS without spaces, and +=

[toysh stdout] Expected "status=0\n['x']\n['x', 'y']\n['x', 'yz']\n", got "status=127\n['']\n['']\n['']\n"

stdout:
status=127
['']
['']
['']
stderr:
sh: a[1]=x: No such file or directory
sh: a[0+2]=y: No such file or directory
sh: a[0+2]+=z: No such file or directory
sush0 Indexed LHS without spaces, and +=

[sush stdout] Expected "status=0\n['x']\n['x', 'y']\n['x', 'yz']\n", got "status=0\n['x']\n['x', 'y']\n['x', 'z']\n"

stdout:
status=0
['x']
['x', 'y']
['x', 'z']
stderr:
dash1 Indexed LHS with spaces

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

stdout:
status=127
stderr:
dash: 3: a[1: not found
dash: 4: a[: not found
dash: 7: Bad substitution
ash1 Indexed LHS with spaces

stdout:
stderr: 
zsh1 Indexed LHS with spaces

stdout:
stderr: 
toysh1 Indexed LHS with spaces

[toysh stdout] Expected "status=0\n['x', 'z']\n", got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
brush1 Indexed LHS with spaces

[brush stdout] Expected "status=0\n['x', 'z']\n", got 'status=127\n[]\n'

stdout:
status=127
[]
stderr:
a[1: command not found
a[: command not found
osh1 Indexed LHS with spaces

[osh stdout] Expected "status=0\n['x', 'z']\n", got 'status=127\n[]\n'

stdout:
status=127
[]
stderr:
  a[1 * 1]=x
  ^~
[ stdin ]:3: Command 'a[1' not found (OILS-ERR-100)
  a[ 1 + 2 ]=z
  ^~
[ stdin ]:4: Command 'a[' not found (OILS-ERR-100)
dash2 Nested a[i[0]]=0

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

stdout:
stderr: 
dash: 3: Syntax error: "(" unexpected
ash2 Nested a[i[0]]=0

stdout:
stderr: 
zsh2 Nested a[i[0]]=0

stdout:
stderr: 
toysh2 Nested a[i[0]]=0

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

stdout:
stderr: 
munmap_chunk(): invalid pointer
brush2 Nested a[i[0]]=0

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

stdout:
[]
stderr:
a[i[0]]=0: command not found
a[: command not found
a[: command not found
a[: command not found
osh2 Nested a[i[0]]=0

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

stdout:
['0']
stderr:
  a[ i[1] ]=1
  ^~
[ stdin ]:6: Command 'a[' not found (OILS-ERR-100)
  a[ i[2] ]=2
  ^~
[ stdin ]:7: Command 'a[' not found (OILS-ERR-100)
  a[ i[1]+i[2] ]=3
  ^~
[ stdin ]:8: Command 'a[' not found (OILS-ERR-100)
dash3 Multiple LHS array words

[dash stdout] Expected 'declare -a a=([0]="0" [1]="" [2]="2")\ndeclare -a b=([0]="3" [1]="4" [2]="/home/spec-test/src")\n---\n[\'b[2\', \'+\', \'0]=bar\']\nstatus=0\ndeclare -a a=([0]="0" [1]="" [2]="2")\ndeclare -a b=([0]="3" [1]="4" [2]="/home/spec-test/src")\n' Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 3: Syntax error: "(" unexpected
ash3 Multiple LHS array words

stdout:
stderr: 
zsh3 Multiple LHS array words

stdout:
stderr: 
mksh3 Multiple LHS array words

stdout:
set -A a
typeset a[0]=0
typeset a[1]=
typeset a[2]=2
set -A b
typeset b[0]=3
typeset b[1]=4
typeset b[2]=/home/spec-test/src
---
['b[2', '+', '0]=bar']
status=0
set -A a
typeset a[0]=0
typeset a[1]=
typeset a[2]=2
set -A b
typeset b[0]=3
typeset b[1]=4
typeset b[2]=/home/spec-test/src
stderr:
ksh3 Multiple LHS array words

[ksh stdout] Expected 'declare -a a=([0]="0" [1]="" [2]="2")\ndeclare -a b=([0]="3" [1]="4" [2]="/home/spec-test/src")\n---\n[\'b[2\', \'+\', \'0]=bar\']\nstatus=0\ndeclare -a a=([0]="0" [1]="" [2]="2")\ndeclare -a b=([0]="3" [1]="4" [2]="/home/spec-test/src")\n' Got "set -A a\ntypeset a[0]=0\ntypeset a[1]=''\ntypeset a[2]=2\nset -A b\ntypeset b[0]=3\ntypeset b[1]=4\ntypeset b[2]=/home/spec-test/src\n---\n['b[2', '+', '0]=bar']\nstatus=0\nset -A a\ntypeset a[0]=0\ntypeset a[1]=''\ntypeset a[2]=2\nset -A b\ntypeset b[0]=3\ntypeset b[1]=4\ntypeset b[2]=/home/spec-test/src\n"

stdout:
set -A a
typeset a[0]=0
typeset a[1]=''
typeset a[2]=2
set -A b
typeset b[0]=3
typeset b[1]=4
typeset b[2]=/home/spec-test/src
---
['b[2', '+', '0]=bar']
status=0
set -A a
typeset a[0]=0
typeset a[1]=''
typeset a[2]=2
set -A b
typeset b[0]=3
typeset b[1]=4
typeset b[2]=/home/spec-test/src
stderr:
toysh3 Multiple LHS array words

[toysh stdout] Expected 'declare -a a=([0]="0" [1]="" [2]="2")\ndeclare -a b=([0]="3" [1]="4" [2]="/home/spec-test/src")\n---\n[\'b[2\', \'+\', \'0]=bar\']\nstatus=0\ndeclare -a a=([0]="0" [1]="" [2]="2")\ndeclare -a b=([0]="3" [1]="4" [2]="/home/spec-test/src")\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
brush3 Multiple LHS array words

[brush stdout] Expected 'declare -a a=([0]="0" [1]="" [2]="2")\ndeclare -a b=([0]="3" [1]="4" [2]="/home/spec-test/src")\n---\n[\'b[2\', \'+\', \'0]=bar\']\nstatus=0\ndeclare -a a=([0]="0" [1]="" [2]="2")\ndeclare -a b=([0]="3" [1]="4" [2]="/home/spec-test/src")\n' Got 'declare -a a=([0]="0" [1]="1" [2]="2")\ndeclare -a b=([0]="3" [1]="4" [2]="5")\n---\nstatus=127\ndeclare -a a=([0]="0" [1]="1" [2]="2")\ndeclare -a b=([0]="3" [1]="4" [2]="5")\n'

stdout:
declare -a a=([0]="0" [1]="1" [2]="2")
declare -a b=([0]="3" [1]="4" [2]="5")
---
status=127
declare -a a=([0]="0" [1]="1" [2]="2")
declare -a b=([0]="3" [1]="4" [2]="5")
stderr:
a[0: command not found
a[0: command not found
osh3 Multiple LHS array words

[osh stdout] Expected 'declare -a a=([0]="0" [1]="" [2]="2")\ndeclare -a b=([0]="3" [1]="4" [2]="/home/spec-test/src")\n---\n[\'b[2\', \'+\', \'0]=bar\']\nstatus=0\ndeclare -a a=([0]="0" [1]="" [2]="2")\ndeclare -a b=([0]="3" [1]="4" [2]="/home/spec-test/src")\n' Got 'declare -a a=(0 1 2)\ndeclare -a b=(3 4 5)\n---\nstatus=127\ndeclare -a a=(0 1 2)\ndeclare -a b=(3 4 5)\n'

stdout:
declare -a a=(0 1 2)
declare -a b=(3 4 5)
---
status=127
declare -a a=(0 1 2)
declare -a b=(3 4 5)
stderr:
  a[0 + 1]=  b[2 + 0]=~/src
  ^~
[ stdin ]:9: Command 'a[0' not found (OILS-ERR-100)
  a[0 + 1]='foo' argv.py b[2 + 0]='bar'
  ^~
[ stdin ]:15: Command 'a[0' not found (OILS-ERR-100)
dash4 LHS array is protected with shopt -s eval_unsafe_arith, e.g. 'a[$(echo 2)]'

[dash stdout] Expected 'declare -a b=([0]="3" [1]="4" [2]="5")\nget 5\nset zzz\ndeclare -a b=([0]="3" [1]="4" [2]="zzz")\n' Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 3: Syntax error: "(" unexpected
ash4 LHS array is protected with shopt -s eval_unsafe_arith, e.g. 'a[$(echo 2)]'

stdout:
stderr: 
zsh4 LHS array is protected with shopt -s eval_unsafe_arith, e.g. 'a[$(echo 2)]'

stdout:
stderr: 
mksh4 LHS array is protected with shopt -s eval_unsafe_arith, e.g. 'a[$(echo 2)]'

stdout:
set -A b
typeset b[0]=3
typeset b[1]=4
typeset b[2]=5
get 5
set zzz
set -A b
typeset b[0]=3
typeset b[1]=4
typeset b[2]=zzz
stderr:
ksh4 LHS array is protected with shopt -s eval_unsafe_arith, e.g. 'a[$(echo 2)]'

[ksh stdout] Expected 'declare -a b=([0]="3" [1]="4" [2]="5")\nget 5\nset zzz\ndeclare -a b=([0]="3" [1]="4" [2]="zzz")\n' Got 'set -A b\ntypeset b[0]=3\ntypeset b[1]=4\ntypeset b[2]=5\nget 5\nset zzz\nset -A b\ntypeset b[0]=3\ntypeset b[1]=4\ntypeset b[2]=zzz\n'

stdout:
set -A b
typeset b[0]=3
typeset b[1]=4
typeset b[2]=5
get 5
set zzz
set -A b
typeset b[0]=3
typeset b[1]=4
typeset b[2]=zzz
stderr:
toysh4 LHS array is protected with shopt -s eval_unsafe_arith, e.g. 'a[$(echo 2)]'

[toysh stdout] Expected 'declare -a b=([0]="3" [1]="4" [2]="5")\nget 5\nset zzz\ndeclare -a b=([0]="3" [1]="4" [2]="zzz")\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
brush4 LHS array is protected with shopt -s eval_unsafe_arith, e.g. 'a[$(echo 2)]'

[brush stdout] Expected 'declare -a b=([0]="3" [1]="4" [2]="5")\nget 5\nset zzz\ndeclare -a b=([0]="3" [1]="4" [2]="zzz")\n' Got 'declare -a b=([0]="3" [1]="4" [2]="5")\ndeclare -a b=([0]="3" [1]="4" [2]="5")\n'

stdout:
declare -a b=([0]="3" [1]="4" [2]="5")
declare -a b=([0]="3" [1]="4" [2]="5")
stderr:
ERROR error: arithmetic evaluation error: failed to parse expression: 'a[$(echo 2)]'
ERROR error: arithmetic evaluation error: failed to parse expression: 'a[$(echo 2)]'
ERROR error: arithmetic evaluation error: failed to parse expression: 'a[$(echo 2)]'
osh4 LHS array is protected with shopt -s eval_unsafe_arith, e.g. 'a[$(echo 2)]'

[osh stdout] Expected 'declare -a b=([0]="3" [1]="4" [2]="5")\nget 5\nset zzz\ndeclare -a b=([0]="3" [1]="4" [2]="zzz")\n' Got 'declare -a b=(3 4 5)\n'
[osh status] Expected 0, got 1

stdout:
declare -a b=(3 4 5)
stderr:
  a[$(echo 2)]
    ^~
[ sh arith expr at ? ]:1

[??? no location ???] fatal: Command subs not allowed here because eval_unsafe_arith is off
dash5 file named a[ is not executed

[dash stdout] Expected 'len=2\n', got 'hi from a[5: 2 args: + 1]=\nhi from a[5: 2 args: / 1]=y\nlen=0\nhi from a[5: 0 args:\n'
[dash status] Expected 1, got 0

stdout:
hi from a[5: 2 args: + 1]=
hi from a[5: 2 args: / 1]=y
len=0
hi from a[5: 0 args:
stderr:
ash5 file named a[ is not executed

stdout:
stderr: 
zsh5 file named a[ is not executed

stdout:
stderr: 
toysh5 file named a[ is not executed

[toysh stdout] Expected 'len=2\n', got ''
[toysh status] Expected 1, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
brush5 file named a[ is not executed

[brush stdout] Expected 'len=2\n', got 'hi from a[5: 2 args: + 1]=\nhi from a[5: 2 args: / 1]=y\nlen=0\nhi from a[5: 0 args:\n'
[brush status] Expected 1, got 0

stdout:
hi from a[5: 2 args: + 1]=
hi from a[5: 2 args: / 1]=y
len=0
hi from a[5: 0 args:
stderr:
osh5 file named a[ is not executed

[osh stdout] Expected 'len=2\n', got 'hi from a[5: 2 args: + 1]=\nhi from a[5: 2 args: / 1]=y\nlen=0\nhi from a[5: 0 args:\n'
[osh status] Expected 1, got 0

stdout:
hi from a[5: 2 args: + 1]=
hi from a[5: 2 args: / 1]=y
len=0
hi from a[5: 0 args:
stderr:
bash6 More fragments like a[ a[5 a[5 + a[5 + 3]

stdout:
a[ status=2
a[5 status=2
a[5 + status=2
a[5 + 3] status=127
a[5 + 3]= status=0
a[5 + 3]+ status=127
a[5 + 3]+= status=0
stderr:
bash: -c: line 1: unexpected EOF while looking for matching `]'
bash: -c: line 1: unexpected EOF while looking for matching `]'
bash: -c: line 1: unexpected EOF while looking for matching `]'
bash: line 1: a[5 + 3]: command not found
bash: line 1: a[5 + 3]+: command not found
dash6 More fragments like a[ a[5 a[5 + a[5 + 3]

[dash stdout] Expected 'a[ status=127\na[5 status=127\na[5 + status=127\na[5 + 3] status=127\na[5 + 3]= status=0\na[5 + 3]+ status=127\na[5 + 3]+= status=0\n' Got 'a[ status=127\na[5 status=127\na[5 + status=127\na[5 + 3] status=127\na[5 + 3]= status=127\na[5 + 3]+ status=127\na[5 + 3]+= status=127\n'

stdout:
a[ status=127
a[5 status=127
a[5 + status=127
a[5 + 3] status=127
a[5 + 3]= status=127
a[5 + 3]+ status=127
a[5 + 3]+= status=127
stderr:
dash: 1: a[: not found
dash: 1: a[5: not found
dash: 1: a[5: not found
dash: 1: a[5: not found
dash: 1: a[5: not found
dash: 1: a[5: not found
dash: 1: a[5: not found
ash6 More fragments like a[ a[5 a[5 + a[5 + 3]

stdout:
a[ status=127
a[5 status=127
a[5 + status=127
a[5 + 3] status=127
a[5 + 3]= status=127
a[5 + 3]+ status=127
a[5 + 3]+= status=127
stderr:
ash: a[: not found
ash: a[5: not found
ash: a[5: not found
ash: a[5: not found
ash: a[5: not found
ash: a[5: not found
ash: a[5: not found
zsh6 More fragments like a[ a[5 a[5 + a[5 + 3]

stdout:
a[ status=1
a[5 status=1
a[5 + status=1
a[5 + 3] status=1
a[5 + 3]= status=1
a[5 + 3]+ status=1
a[5 + 3]+= status=1
stderr:
zsh:1: bad pattern: a[
zsh:1: bad pattern: a[5
zsh:1: bad pattern: a[5
zsh:1: bad pattern: a[5
zsh:1: bad pattern: a[5
zsh:1: bad pattern: a[5
zsh:1: bad pattern: a[5
toysh6 More fragments like a[ a[5 a[5 + a[5 + 3]

[toysh stdout] Expected 'a[ status=127\na[5 status=127\na[5 + status=127\na[5 + 3] status=127\na[5 + 3]= status=0\na[5 + 3]+ status=127\na[5 + 3]+= status=0\n' Got 'a[ status=127\na[5 status=127\na[5 + status=127\na[5 + 3] status=127\na[5 + 3]= status=127\na[5 + 3]+ status=127\na[5 + 3]+= status=127\n'

stdout:
a[ status=127
a[5 status=127
a[5 + status=127
a[5 + 3] status=127
a[5 + 3]= status=127
a[5 + 3]+ status=127
a[5 + 3]+= status=127
stderr:
sh: a[: No such file or directory
sh: a[5: No such file or directory
sh: a[5: No such file or directory
sh: a[5: No such file or directory
sh: a[5: No such file or directory
sh: a[5: No such file or directory
sh: a[5: No such file or directory
brush6 More fragments like a[ a[5 a[5 + a[5 + 3]

[brush stdout] Expected 'a[ status=127\na[5 status=127\na[5 + status=127\na[5 + 3] status=127\na[5 + 3]= status=0\na[5 + 3]+ status=127\na[5 + 3]+= status=0\n' Got 'a[ status=127\na[5 status=127\na[5 + status=127\na[5 + 3] status=127\na[5 + 3]= status=127\na[5 + 3]+ status=127\na[5 + 3]+= status=127\n'

stdout:
a[ status=127
a[5 status=127
a[5 + status=127
a[5 + 3] status=127
a[5 + 3]= status=127
a[5 + 3]+ status=127
a[5 + 3]+= status=127
stderr:
a[: command not found
a[5: command not found
a[5: command not found
a[5: command not found
a[5: command not found
a[5: command not found
a[5: command not found
osh6 More fragments like a[ a[5 a[5 + a[5 + 3]

[osh stdout] Expected 'a[ status=127\na[5 status=127\na[5 + status=127\na[5 + 3] status=127\na[5 + 3]= status=0\na[5 + 3]+ status=127\na[5 + 3]+= status=0\n' Got 'a[ status=127\na[5 status=127\na[5 + status=127\na[5 + 3] status=127\na[5 + 3]= status=127\na[5 + 3]+ status=127\na[5 + 3]+= status=127\n'

stdout:
a[ status=127
a[5 status=127
a[5 + status=127
a[5 + 3] status=127
a[5 + 3]= status=127
a[5 + 3]+ status=127
a[5 + 3]+= status=127
stderr:
  a[
  ^~
[ -c flag ]:1: Command 'a[' not found (OILS-ERR-100)
  a[5
  ^~
[ -c flag ]:1: Command 'a[5' not found (OILS-ERR-100)
  a[5 +
  ^~
[ -c flag ]:1: Command 'a[5' not found (OILS-ERR-100)
  a[5 + 3]
  ^~
[ -c flag ]:1: Command 'a[5' not found (OILS-ERR-100)
  a[5 + 3]=
  ^~
[ -c flag ]:1: Command 'a[5' not found (OILS-ERR-100)
  a[5 + 3]+
  ^~
[ -c flag ]:1: Command 'a[5' not found (OILS-ERR-100)
  a[5 + 3]+=
  ^~
[ -c flag ]:1: Command 'a[5' not found (OILS-ERR-100)
bash7 Are quotes allowed?

stdout:
status=0 len=1
status=1 len=1
status=0 len=2
status=1 len=2
stderr:
bash: line 4: '2': syntax error: operand expected (error token is "'2'")
bash: line 10: 3 + '4': syntax error: operand expected (error token is "'4'")
dash7 Are quotes allowed?

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

stdout:
status=127 len=0
status=127 len=0
status=127 len=0
status=127 len=0
stderr:
dash: 1: a[1]=2: not found
dash: 4: a[2]=3: not found
dash: 7: a[2: not found
dash: 10: a[3: not found
ash7 Are quotes allowed?

stdout:
stderr: 
ash: a[1]=2: not found
ash: syntax error: bad substitution
sush7 Are quotes allowed?

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

stdout:
status=0 len=1
status=1 len=1
status=0 len=2
status=1 len=2
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: '2': syntax error: operand expected (error token is "'2'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 10: 3 + '4': syntax error: operand expected (error token is "'4'")
brush7 Are quotes allowed?

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

stdout:
status=0 len=1
status=0 len=2
status=127 len=2
status=127 len=2
stderr:
a[2: command not found
a[3: command not found
osh7 Are quotes allowed?

[osh stdout] Expected '', got 'status=0 len=1\nstatus=0 len=2\nstatus=127 len=2\nstatus=127 len=2\n'
[osh status] Expected 1, got 0

stdout:
status=0 len=1
status=0 len=2
status=127 len=2
status=127 len=2
stderr:
  a[2 + "3"]=5
  ^~
[ stdin ]:7: Command 'a[2' not found (OILS-ERR-100)
  a[3 + '4']=5
  ^~
[ stdin ]:10: Command 'a[3' not found (OILS-ERR-100)
dash8 Tricky parsing - a[ a[0]=1 ]=X a[ a[0]+=1 ]+=X

[dash stdout] Expected 'assign=42\ndeclare -a a=([0]="1" [1]="X")\ndeclare -a a=([0]="1" [1]="X" [2]="3" [3]="Y")\n---\ndeclare -a a=([0]="2" [1]="X" [2]="3X" [3]="Y")\n' Got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 4: arithmetic expression: expecting EOF: " z[0] = 42 "
ash8 Tricky parsing - a[ a[0]=1 ]=X a[ a[0]+=1 ]+=X

stdout:
stderr: 
zsh8 Tricky parsing - a[ a[0]=1 ]=X a[ a[0]+=1 ]+=X

stdout:
stderr: 
mksh8 Tricky parsing - a[ a[0]=1 ]=X a[ a[0]+=1 ]+=X

stdout:
stderr: 
ksh8 Tricky parsing - a[ a[0]=1 ]=X a[ a[0]+=1 ]+=X

[ksh stdout] Expected 'assign=42\ndeclare -a a=([0]="1" [1]="X")\ndeclare -a a=([0]="1" [1]="X" [2]="3" [3]="Y")\n---\ndeclare -a a=([0]="2" [1]="X" [2]="3X" [3]="Y")\n' Got 'assign=42\n---\n'
[ksh status] Expected 0, got 127

stdout:
assign=42
---
stderr:
E: ksh: <stdin>[7]: declare: inaccessible or not found
E: ksh: <stdin>[10]: declare: inaccessible or not found
E: ksh: <stdin>[15]: declare: inaccessible or not found
toysh8 Tricky parsing - a[ a[0]=1 ]=X a[ a[0]+=1 ]+=X

[toysh stdout] Expected 'assign=42\ndeclare -a a=([0]="1" [1]="X")\ndeclare -a a=([0]="1" [1]="X" [2]="3" [3]="Y")\n---\ndeclare -a a=([0]="2" [1]="X" [2]="3X" [3]="Y")\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush8 Tricky parsing - a[ a[0]=1 ]=X a[ a[0]+=1 ]+=X

[sush stdout] Expected 'assign=42\ndeclare -a a=([0]="1" [1]="X")\ndeclare -a a=([0]="1" [1]="X" [2]="3" [3]="Y")\n---\ndeclare -a a=([0]="2" [1]="X" [2]="3X" [3]="Y")\n' Got 'assign=42\ndeclare -a a=([0]="1" [1]="X")\ndeclare -a a=([0]="1" [1]="X" [2]="3" [3]="Y")\n---\ndeclare -a a=([0]="2" [1]="X" [2]="X" [3]="Y")\n'

stdout:
assign=42
declare -a a=([0]="1" [1]="X")
declare -a a=([0]="1" [1]="X" [2]="3" [3]="Y")
---
declare -a a=([0]="2" [1]="X" [2]="X" [3]="Y")
stderr:
brush8 Tricky parsing - a[ a[0]=1 ]=X a[ a[0]+=1 ]+=X

[brush stdout] Expected 'assign=42\ndeclare -a a=([0]="1" [1]="X")\ndeclare -a a=([0]="1" [1]="X" [2]="3" [3]="Y")\n---\ndeclare -a a=([0]="2" [1]="X" [2]="3X" [3]="Y")\n' Got 'assign=42\n---\n'

stdout:
assign=42
---
stderr:
ERROR error: arithmetic evaluation error: failed to parse expression: 'a[0'
declare: a: not found
a[: command not found
declare: a: not found
a[: command not found
declare: a: not found
osh8 Tricky parsing - a[ a[0]=1 ]=X a[ a[0]+=1 ]+=X

[osh stdout] Expected 'assign=42\ndeclare -a a=([0]="1" [1]="X")\ndeclare -a a=([0]="1" [1]="X" [2]="3" [3]="Y")\n---\ndeclare -a a=([0]="2" [1]="X" [2]="3X" [3]="Y")\n' Got 'assign=42\n'
[osh status] Expected 0, got 2

stdout:
assign=42
stderr:
  a[0
     ^
[ sh arith expr at line 6 of [ stdin ] ]:1

  a[a[0]=1]=X
  ^~
[ stdin ]:6: Parser expected Id.Arith_RBracket, got Id.Eof_Real
dash9 argv.py a[1 + 2]=

[dash stdout] Expected "['a[1', '+', '2]=']\nstatus=0\n['a[1', '+', '2]+=']\nstatus=0\n['a[3', '+', '4]=']\n['a[3', '+', '4]+=']\n" Got "status=127\nstatus=127\n['a[3', '+', '4]=']\n['a[3', '+', '4]+=']\n"

stdout:
status=127
status=127
['a[3', '+', '4]=']
['a[3', '+', '4]+=']
stderr:
dash: 4: a[1: not found
dash: 7: a[1: not found
ash9 argv.py a[1 + 2]=

stdout:
stderr: 
zsh9 argv.py a[1 + 2]=

stdout:
stderr: 
toysh9 argv.py a[1 + 2]=

[toysh stdout] Expected "['a[1', '+', '2]=']\nstatus=0\n['a[1', '+', '2]+=']\nstatus=0\n['a[3', '+', '4]=']\n['a[3', '+', '4]+=']\n" Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
brush9 argv.py a[1 + 2]=

[brush stdout] Expected "['a[1', '+', '2]=']\nstatus=0\n['a[1', '+', '2]+=']\nstatus=0\n['a[3', '+', '4]=']\n['a[3', '+', '4]+=']\n" Got "status=127\nstatus=127\n['a[3', '+', '4]=']\n['a[3', '+', '4]+=']\n"

stdout:
status=127
status=127
['a[3', '+', '4]=']
['a[3', '+', '4]+=']
stderr:
a[1: command not found
a[1: command not found
osh9 argv.py a[1 + 2]=

[osh stdout] Expected "['a[1', '+', '2]=']\nstatus=0\n['a[1', '+', '2]+=']\nstatus=0\n['a[3', '+', '4]=']\n['a[3', '+', '4]+=']\n" Got "status=127\nstatus=127\n['a[3', '+', '4]=']\n['a[3', '+', '4]+=']\n"

stdout:
status=127
status=127
['a[3', '+', '4]=']
['a[3', '+', '4]+=']
stderr:
  a[1 + 2]= argv.py a[1 + 2]=
  ^~
[ stdin ]:4: Command 'a[1' not found (OILS-ERR-100)
  a[1 + 2]+= argv.py a[1 + 2]+=
  ^~
[ stdin ]:7: Command 'a[1' not found (OILS-ERR-100)
dash10 declare builtin doesn't allow spaces

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

stdout:
stderr: 
dash: 3: declare: not found
dash: 4: declare: not found
dash: 6: declare: not found
dash: 7: declare: not found
ash10 declare builtin doesn't allow spaces

stdout:
stderr: 
zsh10 declare builtin doesn't allow spaces

stdout:
stderr: 
mksh10 declare builtin doesn't allow spaces

stdout:
stderr: 
ksh10 declare builtin doesn't allow spaces

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

stdout:
stderr: 
E: ksh: <stdin>[3]: declare: inaccessible or not found
E: ksh: <stdin>[4]: declare: inaccessible or not found
E: ksh: <stdin>[6]: declare: inaccessible or not found
E: ksh: <stdin>[7]: declare: inaccessible or not found
toysh10 declare builtin doesn't allow spaces

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

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush10 declare builtin doesn't allow spaces

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

stdout:
declare -a a=([0]="1" [1]="X")
declare -a a=([0]="1" [1]="X" [2]="3" [3]="Y")
stderr:
brush10 declare builtin doesn't allow spaces

[brush stdout] Expected 'declare -a a=([0]="1" [1]="X")\ndeclare -a a=([0]="1" [1]="X" [2]="3")\n' Got 'declare -a a=([0]="1]=X")\ndeclare -a a=([0]="1]=X" [2]="3")\n'

stdout:
declare -a a=([0]="1]=X")
declare -a a=([0]="1]=X" [2]="3")
stderr:
osh10 declare builtin doesn't allow spaces

stdout:
stderr: 
  declare a[a[0]=1]=X
          ^~
[ stdin ]:3: fatal: Assignment builtin expected NAME=value, got 'a[a[0]=1]=X'