Results for array-sparse.test.sh

statusbashmkshkshtoyshsushbrushosh
pass 2167081538
ok 11500000
N-I 72900000
BUG 1000000
FAIL 00334032252
total40404040404040
casebashmkshkshtoyshsushbrushoshdescription
0N-I N-I FAIL FAIL FAIL FAIL pass Performance demo
detailsdetailsdetailsdetailsdetailsdetails
1pass pass pass FAIL pass pass pass test length
details
2ok ok FAIL FAIL FAIL FAIL pass test "declare -p sp"
detailsdetailsdetailsdetailsdetailsdetails
3pass ok FAIL FAIL FAIL pass pass +=
detailsdetailsdetailsdetails
4pass ok FAIL FAIL pass pass pass a[i]=v
detailsdetailsdetails
5pass N-I FAIL FAIL FAIL FAIL pass Negative index with a[i]=v
detailsdetailsdetailsdetailsdetails
6pass N-I pass FAIL pass pass FAIL a[i]=v with BigInt
detailsdetailsdetails
7ok N-I FAIL FAIL FAIL FAIL pass Negative out-of-bound index with a[i]=v (1/2)
detailsdetailsdetailsdetailsdetailsdetails
8ok N-I FAIL FAIL FAIL FAIL pass Negative out-of-bound index with a[i]=v (2/2)
detailsdetailsdetailsdetailsdetailsdetails
9pass ok FAIL FAIL FAIL pass pass xtrace a+=()
detailsdetailsdetailsdetails
10ok ok FAIL FAIL FAIL FAIL pass unset -v a[i]
detailsdetailsdetailsdetailsdetailsdetails
11ok N-I FAIL FAIL FAIL FAIL pass unset -v a[i] with out-of-bound negative index
detailsdetailsdetailsdetailsdetailsdetails
12ok N-I FAIL FAIL FAIL FAIL pass unset -v a[i] for max index
detailsdetailsdetailsdetailsdetailsdetails
13pass N-I FAIL FAIL FAIL FAIL pass [[ -v a[i] ]]
detailsdetailsdetailsdetailsdetails
14ok N-I FAIL FAIL FAIL FAIL pass [[ -v a[i] ]] with invalid negative index
detailsdetailsdetailsdetailsdetailsdetails
15pass pass pass FAIL FAIL pass pass ((sp[i])) and ((sp[i]++))
detailsdetails
16ok N-I FAIL FAIL FAIL FAIL pass ((sp[i])) and ((sp[i]++)) with invalid negative index
detailsdetailsdetailsdetailsdetailsdetails
17pass N-I FAIL FAIL FAIL FAIL pass ${sp[i]}
detailsdetailsdetailsdetailsdetails
18ok N-I FAIL FAIL FAIL FAIL pass ${sp[i]} with negative invalid index
detailsdetailsdetailsdetailsdetailsdetails
19pass N-I FAIL FAIL FAIL FAIL pass ${a[@]:offset:length}
detailsdetailsdetailsdetailsdetails
20pass N-I FAIL FAIL pass pass pass ${@:offset:length}
detailsdetailsdetails
21BUG N-I FAIL FAIL pass FAIL FAIL ${a[@]:BigInt}
detailsdetailsdetailsdetailsdetailsdetails
22pass pass pass FAIL FAIL pass pass ${a[@]}
detailsdetails
23pass N-I FAIL FAIL FAIL pass pass ${a[@]#...}
detailsdetailsdetailsdetails
24pass N-I FAIL FAIL FAIL pass pass ${a[@]/pat/rep}
detailsdetailsdetailsdetails
25ok N-I FAIL FAIL FAIL FAIL pass ${a[@]@P}, ${a[@]@Q}, and ${a[@]@a}
detailsdetailsdetailsdetailsdetailsdetails
26pass pass pass FAIL FAIL FAIL pass ${a[@]-unset}, ${a[@]:-empty}, etc.
detailsdetailsdetails
27pass pass pass FAIL pass pass pass ${a-}
details
28pass N-I FAIL FAIL pass pass pass ${!a[0]}
detailsdetailsdetails
29pass N-I FAIL FAIL FAIL pass pass ${!a[@]}
detailsdetailsdetailsdetails
30pass pass pass FAIL FAIL FAIL pass "${a[*]}"
detailsdetailsdetails
31pass N-I FAIL FAIL FAIL pass pass compgen -F _set_COMPREPLY
detailsdetailsdetailsdetails
32N-I N-I FAIL FAIL FAIL FAIL pass compadjust
detailsdetailsdetailsdetailsdetailsdetails
33N-I N-I FAIL FAIL FAIL FAIL pass (YSH) @[sp] and @sp
detailsdetailsdetailsdetailsdetailsdetails
34N-I N-I FAIL FAIL FAIL FAIL pass (YSH) $[a1 === a2]
detailsdetailsdetailsdetailsdetailsdetails
35N-I N-I FAIL FAIL FAIL FAIL pass (YSH) append v1 v2... (a)
detailsdetailsdetailsdetailsdetailsdetails
36N-I N-I FAIL FAIL FAIL FAIL pass (YSH) $[bool(a)]
detailsdetailsdetailsdetailsdetailsdetails
37N-I N-I FAIL FAIL FAIL FAIL pass crash dump
detailsdetailsdetailsdetailsdetailsdetails
38ok N-I FAIL FAIL FAIL FAIL pass Regression: a[-1]=1
detailsdetailsdetailsdetailsdetailsdetails
39pass N-I FAIL FAIL pass pass pass Initializing indexed array with ([index]=value)
detailsdetailsdetails
95 passed, 16 OK, 36 not implemented, 1 BUG, 132 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

bash0 Performance demo

stdout:
stderr: 
mksh0 Performance demo

stdout:
stderr: 
ksh0 Performance demo

[ksh stdout] Expected 'BashArray\nlen: 6\nsubst: foo 25 26 27 bar sparse\nkeys: 0 1 2 3 4 10\nslice: 26 27 bar\nget0: set0\nget1: 25\n---\nappend\nsubst: set0 25 26 27 bar sparse x y\nkeys: 0 1 2 3 4 10 11 12\n---\nunset\nsubst: set0 25 26 27 bar sparse y\nkeys: 0 1 2 3 4 10 12\n' Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[8]: syntax error: unexpected '('
toysh0 Performance demo

[toysh stdout] Expected 'BashArray\nlen: 6\nsubst: foo 25 26 27 bar sparse\nkeys: 0 1 2 3 4 10\nslice: 26 27 bar\nget0: set0\nget1: 25\n---\nappend\nsubst: set0 25 26 27 bar sparse x y\nkeys: 0 1 2 3 4 10 11 12\n---\nunset\nsubst: set0 25 26 27 bar sparse y\nkeys: 0 1 2 3 4 10 12\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush0 Performance demo

[sush stdout] Expected 'BashArray\nlen: 6\nsubst: foo 25 26 27 bar sparse\nkeys: 0 1 2 3 4 10\nslice: 26 27 bar\nget0: set0\nget1: 25\n---\nappend\nsubst: set0 25 26 27 bar sparse x y\nkeys: 0 1 2 3 4 10 11 12\n---\nunset\nsubst: set0 25 26 27 bar sparse y\nkeys: 0 1 2 3 4 10 12\n' Got 'len: 6\nsubst: foo 25 26 27 bar sparse\nkeys: 0 1 2 3 4 10\nslice: 26 27 bar\nget0: set0\nget1: 25\n---\nappend\nsubst: set0 25 26 27 bar sparse x y\nkeys: 0 1 2 3 4 5 6 7\n---\nunset\nsubst: set0 25 26 27 bar sparse x y\nkeys: 0 1 2 3 4 5 6 7\n'

stdout:
len: 6
subst: foo 25 26 27 bar sparse
keys: 0 1 2 3 4 10
slice: 26 27 bar
get0: set0
get1: 25
---
append
subst: set0 25 26 27 bar sparse x y
keys: 0 1 2 3 4 5 6 7
---
unset
subst: set0 25 26 27 bar sparse x y
keys: 0 1 2 3 4 5 6 7
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: Unexpected token: (sp)]

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 13: shopt: ysh:upgrade: not supported yet
brush0 Performance demo

[brush stdout] Expected 'BashArray\nlen: 6\nsubst: foo 25 26 27 bar sparse\nkeys: 0 1 2 3 4 10\nslice: 26 27 bar\nget0: set0\nget1: 25\n---\nappend\nsubst: set0 25 26 27 bar sparse x y\nkeys: 0 1 2 3 4 10 11 12\n---\nunset\nsubst: set0 25 26 27 bar sparse y\nkeys: 0 1 2 3 4 10 12\n' Got 'len: 6\nsubst: foo 25 26 27 bar sparse\nkeys: 0 1 2 3 4 10\nslice: 26 27 bar\nget0: set0\nget1: 25\n---\nappend\nsubst: set0 25 26 27 bar sparse x y\nkeys: 0 1 2 3 4 10 11 12\n---\nunset\nsubst: set0 25 26 27 bar sparse y\nkeys: 0 1 2 3 4 10 12\n'

stdout:
len: 6
subst: foo 25 26 27 bar sparse
keys: 0 1 2 3 4 10
slice: 26 27 bar
get0: set0
get1: 25
---
append
subst: set0 25 26 27 bar sparse x y
keys: 0 1 2 3 4 10 11 12
---
unset
subst: set0 25 26 27 bar sparse y
keys: 0 1 2 3 4 10 12
stderr:
ERROR main: syntax error near token `]' (line 1 col 16)
shopt: ysh:upgrade: invalid shell option name
toysh1 test length

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

stdout:
stderr: 
main: line 1: sh: syntax error: x
bash2 test "declare -p sp"

stdout:
declare -a a0=()
declare -a a1=([0]="1")
declare -a a2=([0]="1" [1]="2")
declare -a a=([0]="x" [1]="y" [2]="z" [3]="w" [500]="100" [1000]="100")
stderr:
mksh2 test "declare -p sp"

stdout:
set -A a1
typeset a1[0]=1
set -A a2
typeset a2[0]=1
typeset a2[1]=2
set -A a
typeset a[0]=x
typeset a[1]=y
typeset a[2]=z
typeset a[3]=w
typeset a[500]=100
typeset a[1000]=100
stderr:
ksh2 test "declare -p sp"

[ksh stdout] Expected 'declare -a a0=()\ndeclare -a a1=(1)\ndeclare -a a2=(1 2)\ndeclare -a a=([0]=x [1]=y [2]=z [3]=w [500]=100 [1000]=100)\n' Got ''
[ksh status] Expected 0, got 127

stdout:
stderr: 
E: ksh: <stdin>[14]: declare: inaccessible or not found
toysh2 test "declare -p sp"

[toysh stdout] Expected 'declare -a a0=()\ndeclare -a a1=(1)\ndeclare -a a2=(1 2)\ndeclare -a a=([0]=x [1]=y [2]=z [3]=w [500]=100 [1000]=100)\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: a1=
sush2 test "declare -p sp"

[sush stdout] Expected 'declare -a a0=()\ndeclare -a a1=(1)\ndeclare -a a2=(1 2)\ndeclare -a a=([0]=x [1]=y [2]=z [3]=w [500]=100 [1000]=100)\n' Got 'declare -a a0\ndeclare -a a1=([0]="1")\ndeclare -a a2=([0]="1" [1]="2")\ndeclare -a a=([0]="x" [1]="y" [2]="z" [3]="w" [500]="100" [1000]="100")\n'

stdout:
declare -a a0
declare -a a1=([0]="1")
declare -a a2=([0]="1" [1]="2")
declare -a a=([0]="x" [1]="y" [2]="z" [3]="w" [500]="100" [1000]="100")
stderr:
brush2 test "declare -p sp"

[brush stdout] Expected 'declare -a a0=()\ndeclare -a a1=(1)\ndeclare -a a2=(1 2)\ndeclare -a a=([0]=x [1]=y [2]=z [3]=w [500]=100 [1000]=100)\n' Got 'declare -a a0=()\ndeclare -a a1=([0]="1")\ndeclare -a a2=([0]="1" [1]="2")\ndeclare -a a=([0]="x" [1]="y" [2]="z" [3]="w" [500]="100" [1000]="100")\n'

stdout:
declare -a a0=()
declare -a a1=([0]="1")
declare -a a2=([0]="1" [1]="2")
declare -a a=([0]="x" [1]="y" [2]="z" [3]="w" [500]="100" [1000]="100")
stderr:
mksh3 +=

stdout:
set -A sp1
typeset sp1[10]=a
typeset sp1[20]=b
typeset sp1[99]=c
set -A sp1
typeset sp1[10]=a
typeset sp1[20]=b
typeset sp1[99]=c
typeset sp1[100]=1
typeset sp1[101]=2
typeset sp1[102]=3
stderr:
ksh3 +=

[ksh stdout] Expected 'declare -a sp1=([10]=a [20]=b [99]=c)\ndeclare -a sp1=([10]=a [20]=b [99]=c [100]=1 [101]=2 [102]=3)\n' Got 'set -A sp1\ntypeset sp1[10]=a\ntypeset sp1[20]=b\ntypeset sp1[99]=c\nset -A sp1\ntypeset sp1[10]=a\ntypeset sp1[20]=b\ntypeset sp1[99]=c\ntypeset sp1[100]=1\ntypeset sp1[101]=2\ntypeset sp1[102]=3\n'

stdout:
set -A sp1
typeset sp1[10]=a
typeset sp1[20]=b
typeset sp1[99]=c
set -A sp1
typeset sp1[10]=a
typeset sp1[20]=b
typeset sp1[99]=c
typeset sp1[100]=1
typeset sp1[101]=2
typeset sp1[102]=3
stderr:
toysh3 +=

[toysh stdout] Expected 'declare -a sp1=([10]=a [20]=b [99]=c)\ndeclare -a sp1=([10]=a [20]=b [99]=c [100]=1 [101]=2 [102]=3)\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
sh: sp1[10]=a: No such file or directory
sh: sp1[20]=b: No such file or directory
sh: sp1[99]=c: No such file or directory
sh: typeset: No such file or directory
main: line 5: sh: syntax error: 1
sush3 +=

[sush stdout] Expected 'declare -a sp1=([10]=a [20]=b [99]=c)\ndeclare -a sp1=([10]=a [20]=b [99]=c [100]=1 [101]=2 [102]=3)\n' Got 'declare -a sp1=([10]=a [20]=b [99]=c)\ndeclare -a sp1=([0]=a [1]=b [2]=c [3]=1 [4]=2 [5]=3)\n'

stdout:
declare -a sp1=([10]=a [20]=b [99]=c)
declare -a sp1=([0]=a [1]=b [2]=c [3]=1 [4]=2 [5]=3)
stderr:
mksh4 a[i]=v

stdout:
set -A sp1
typeset sp1[10]=a
typeset sp1[20]=b
typeset sp1[30]=c
set -A sp1
typeset sp1[10]=X
typeset sp1[20]=b
typeset sp1[25]=Y
typeset sp1[30]=c
typeset sp1[90]=Z
stderr:
ksh4 a[i]=v

[ksh stdout] Expected 'declare -a sp1=([10]=a [20]=b [30]=c)\ndeclare -a sp1=([10]=X [20]=b [25]=Y [30]=c [90]=Z)\n' Got 'set -A sp1\ntypeset sp1[10]=a\ntypeset sp1[20]=b\ntypeset sp1[30]=c\nset -A sp1\ntypeset sp1[10]=X\ntypeset sp1[20]=b\ntypeset sp1[25]=Y\ntypeset sp1[30]=c\ntypeset sp1[90]=Z\n'

stdout:
set -A sp1
typeset sp1[10]=a
typeset sp1[20]=b
typeset sp1[30]=c
set -A sp1
typeset sp1[10]=X
typeset sp1[20]=b
typeset sp1[25]=Y
typeset sp1[30]=c
typeset sp1[90]=Z
stderr:
toysh4 a[i]=v

[toysh stdout] Expected 'declare -a sp1=([10]=a [20]=b [30]=c)\ndeclare -a sp1=([10]=X [20]=b [25]=Y [30]=c [90]=Z)\n' Got ''

stdout:
stderr: 
sh: sp1[10]=a: No such file or directory
sh: sp1[20]=b: No such file or directory
sh: sp1[30]=c: No such file or directory
sh: typeset: No such file or directory
sh: sp1[10]=X: No such file or directory
sh: sp1[25]=Y: No such file or directory
sh: sp1[90]=Z: No such file or directory
sh: typeset: No such file or directory
mksh5 Negative index with a[i]=v

stdout:
stderr: 
ksh5 Negative index with a[i]=v

[ksh stdout] Expected 'declare -a sp1=([9]=x)\ndeclare -a sp1=([0]=D [2]=C [6]=B [9]=A)\n' Got 'set -A sp1\ntypeset sp1[9]=x\nset -A sp1\ntypeset sp1[9]=x\ntypeset sp1[4294967286]=D\ntypeset sp1[4294967288]=C\ntypeset sp1[4294967292]=B\ntypeset sp1[4294967295]=A\n'

stdout:
set -A sp1
typeset sp1[9]=x
set -A sp1
typeset sp1[9]=x
typeset sp1[4294967286]=D
typeset sp1[4294967288]=C
typeset sp1[4294967292]=B
typeset sp1[4294967295]=A
stderr:
toysh5 Negative index with a[i]=v

[toysh stdout] Expected 'declare -a sp1=([9]=x)\ndeclare -a sp1=([0]=D [2]=C [6]=B [9]=A)\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush5 Negative index with a[i]=v

[sush stdout] Expected 'declare -a sp1=([9]=x)\ndeclare -a sp1=([0]=D [2]=C [6]=B [9]=A)\n' Got 'declare -a sp1=([9]=x)\ndeclare -a sp1=([9]=x)\n'

stdout:
declare -a sp1=([9]=x)
declare -a sp1=([9]=x)
stderr:
brush5 Negative index with a[i]=v

[brush stdout] Expected 'declare -a sp1=([9]=x)\ndeclare -a sp1=([0]=D [2]=C [6]=B [9]=A)\n' Got 'declare -a sp1=([9]=x)\ndeclare -a sp1=([0]=D [9]=x)\n'

stdout:
declare -a sp1=([9]=x)
declare -a sp1=([0]=D [9]=x)
stderr:
mksh6 a[i]=v with BigInt

stdout:
stderr: 
toysh6 a[i]=v with BigInt

[toysh stdout] Expected '3\n4\n5\n6\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
osh6 a[i]=v with BigInt

[osh stdout] Expected '3\n4\n5\n6\n', got '3\n3\n4\n5\n'

stdout:
3
3
4
5
stderr:
bash7 Negative out-of-bound index with a[i]=v (1/2)

stdout:
declare -a sp1=([9]="x")
stderr:
bash: line 4: sp1[-11]: bad array subscript
mksh7 Negative out-of-bound index with a[i]=v (1/2)

stdout:
stderr: 
ksh7 Negative out-of-bound index with a[i]=v (1/2)

[ksh stderr] Expected ' sp1[-11]=E\n ^~~~\n[ stdin ]:4: fatal: Index -11 is out of bounds for array of length 10\n' Got 'E: ksh: <stdin>[5]: declare: inaccessible or not found\n'
[ksh status] Expected 1, got 127

stdout:
stderr: 
E: ksh: <stdin>[5]: declare: inaccessible or not found
toysh7 Negative out-of-bound index with a[i]=v (1/2)

[toysh stderr] Expected ' sp1[-11]=E\n ^~~~\n[ stdin ]:4: fatal: Index -11 is out of bounds for array of length 10\n' Got 'munmap_chunk(): invalid pointer\n'
[toysh status] Expected 1, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush7 Negative out-of-bound index with a[i]=v (1/2)

[sush stdout] Expected '', got 'declare -a sp1=([9]="x")\n'
[sush stderr] Expected ' sp1[-11]=E\n ^~~~\n[ stdin ]:4: fatal: Index -11 is out of bounds for array of length 10\n' Got ''
[sush status] Expected 1, got 0

stdout:
declare -a sp1=([9]="x")
stderr:
brush7 Negative out-of-bound index with a[i]=v (1/2)

[brush stdout] Expected '', got 'declare -a sp1=([0]="E" [9]="x")\n'
[brush stderr] Expected ' sp1[-11]=E\n ^~~~\n[ stdin ]:4: fatal: Index -11 is out of bounds for array of length 10\n' Got ''
[brush status] Expected 1, got 0

stdout:
declare -a sp1=([0]="E" [9]="x")
stderr:
bash8 Negative out-of-bound index with a[i]=v (2/2)

stdout:
declare -a sp1=([9]="x")
stderr:
bash: line 5: sp1[-21]: bad array subscript
mksh8 Negative out-of-bound index with a[i]=v (2/2)

stdout:
stderr: 
ksh8 Negative out-of-bound index with a[i]=v (2/2)

[ksh stderr] Expected ' sp1[-21]=F\n ^~~~\n[ stdin ]:5: fatal: Index -21 is out of bounds for array of length 10\n' Got 'E: ksh: <stdin>[6]: declare: inaccessible or not found\n'
[ksh status] Expected 1, got 127

stdout:
stderr: 
E: ksh: <stdin>[6]: declare: inaccessible or not found
toysh8 Negative out-of-bound index with a[i]=v (2/2)

[toysh stderr] Expected ' sp1[-21]=F\n ^~~~\n[ stdin ]:5: fatal: Index -21 is out of bounds for array of length 10\n' Got 'munmap_chunk(): invalid pointer\n'
[toysh status] Expected 1, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush8 Negative out-of-bound index with a[i]=v (2/2)

[sush stdout] Expected '', got 'declare -a sp1=([9]="x")\n'
[sush stderr] Expected ' sp1[-21]=F\n ^~~~\n[ stdin ]:5: fatal: Index -21 is out of bounds for array of length 10\n' Got ''
[sush status] Expected 1, got 0

stdout:
declare -a sp1=([9]="x")
stderr:
brush8 Negative out-of-bound index with a[i]=v (2/2)

[brush stdout] Expected '', got 'declare -a sp1=([0]="F" [9]="x")\n'
[brush stderr] Expected ' sp1[-21]=F\n ^~~~\n[ stdin ]:5: fatal: Index -21 is out of bounds for array of length 10\n' Got ''
[brush status] Expected 1, got 0

stdout:
declare -a sp1=([0]="F" [9]="x")
stderr:
mksh9 xtrace a+=()

stdout:
stderr: 
+ set -A sp1+ -- 2
ksh9 xtrace a+=()

[ksh stderr] Expected '+ sp1+=(2)\n', got '+ set -A sp1+ -- 2\n'

stdout:
stderr: 
+ set -A sp1+ -- 2
toysh9 xtrace a+=()

[toysh stderr] Expected '+ sp1+=(2)\n', got 'main: line 1: sh: syntax error: 1\n'
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: 1
sush9 xtrace a+=()

[sush stderr] Expected '+ sp1+=(2)\n', got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: set: -x: invalid option\n'
[sush status] Expected 0, got 2

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: set: -x: invalid option
bash10 unset -v a[i]

stdout:
declare -a a=([0]="1" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")
declare -a a=([0]="1" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")
declare -a a=([0]="1" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")
declare -a a=([2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")
stderr:
mksh10 unset -v a[i]

stdout:
set -A a
typeset a[0]=1
typeset a[1]=2
typeset a[2]=3
typeset a[3]=4
typeset a[4]=5
typeset a[5]=6
typeset a[6]=7
typeset a[7]=8
typeset a[8]=9
set -A a
typeset a[0]=1
typeset a[2]=3
typeset a[3]=4
typeset a[4]=5
typeset a[5]=6
typeset a[6]=7
typeset a[7]=8
typeset a[8]=9
set -A a
typeset a[0]=1
typeset a[2]=3
typeset a[3]=4
typeset a[4]=5
typeset a[5]=6
typeset a[6]=7
typeset a[7]=8
typeset a[8]=9
set -A a
typeset a[2]=3
typeset a[3]=4
typeset a[4]=5
typeset a[5]=6
typeset a[6]=7
typeset a[7]=8
typeset a[8]=9
stderr:
ksh10 unset -v a[i]

[ksh stdout] Expected 'declare -a a=(1 2 3 4 5 6 7 8 9)\ndeclare -a a=([0]=1 [2]=3 [3]=4 [4]=5 [5]=6 [6]=7 [7]=8 [8]=9)\ndeclare -a a=([0]=1 [2]=3 [3]=4 [4]=5 [5]=6 [6]=7 [7]=8 [8]=9)\ndeclare -a a=([2]=3 [3]=4 [4]=5 [5]=6 [6]=7 [7]=8 [8]=9)\n' Got 'set -A a\ntypeset a[0]=1\ntypeset a[1]=2\ntypeset a[2]=3\ntypeset a[3]=4\ntypeset a[4]=5\ntypeset a[5]=6\ntypeset a[6]=7\ntypeset a[7]=8\ntypeset a[8]=9\nset -A a\ntypeset a[0]=1\ntypeset a[2]=3\ntypeset a[3]=4\ntypeset a[4]=5\ntypeset a[5]=6\ntypeset a[6]=7\ntypeset a[7]=8\ntypeset a[8]=9\nset -A a\ntypeset a[0]=1\ntypeset a[2]=3\ntypeset a[3]=4\ntypeset a[4]=5\ntypeset a[5]=6\ntypeset a[6]=7\ntypeset a[7]=8\ntypeset a[8]=9\nset -A a\ntypeset a[2]=3\ntypeset a[3]=4\ntypeset a[4]=5\ntypeset a[5]=6\ntypeset a[6]=7\ntypeset a[7]=8\ntypeset a[8]=9\n'

stdout:
set -A a
typeset a[0]=1
typeset a[1]=2
typeset a[2]=3
typeset a[3]=4
typeset a[4]=5
typeset a[5]=6
typeset a[6]=7
typeset a[7]=8
typeset a[8]=9
set -A a
typeset a[0]=1
typeset a[2]=3
typeset a[3]=4
typeset a[4]=5
typeset a[5]=6
typeset a[6]=7
typeset a[7]=8
typeset a[8]=9
set -A a
typeset a[0]=1
typeset a[2]=3
typeset a[3]=4
typeset a[4]=5
typeset a[5]=6
typeset a[6]=7
typeset a[7]=8
typeset a[8]=9
set -A a
typeset a[2]=3
typeset a[3]=4
typeset a[4]=5
typeset a[5]=6
typeset a[6]=7
typeset a[7]=8
typeset a[8]=9
stderr:
toysh10 unset -v a[i]

[toysh stdout] Expected 'declare -a a=(1 2 3 4 5 6 7 8 9)\ndeclare -a a=([0]=1 [2]=3 [3]=4 [4]=5 [5]=6 [6]=7 [7]=8 [8]=9)\ndeclare -a a=([0]=1 [2]=3 [3]=4 [4]=5 [5]=6 [6]=7 [7]=8 [8]=9)\ndeclare -a a=([2]=3 [3]=4 [4]=5 [5]=6 [6]=7 [7]=8 [8]=9)\n' Got ''
[toysh status] Expected 0, got 2

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

[sush stdout] Expected 'declare -a a=(1 2 3 4 5 6 7 8 9)\ndeclare -a a=([0]=1 [2]=3 [3]=4 [4]=5 [5]=6 [6]=7 [7]=8 [8]=9)\ndeclare -a a=([0]=1 [2]=3 [3]=4 [4]=5 [5]=6 [6]=7 [7]=8 [8]=9)\ndeclare -a a=([2]=3 [3]=4 [4]=5 [5]=6 [6]=7 [7]=8 [8]=9)\n' Got 'declare -a a=([0]="1" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")\ndeclare -a a=([0]="1" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")\ndeclare -a a=([0]="1" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")\ndeclare -a a=([0]="1" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")\n'

stdout:
declare -a a=([0]="1" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")
declare -a a=([0]="1" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")
declare -a a=([0]="1" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")
declare -a a=([0]="1" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")
stderr:
brush10 unset -v a[i]

[brush stdout] Expected 'declare -a a=(1 2 3 4 5 6 7 8 9)\ndeclare -a a=([0]=1 [2]=3 [3]=4 [4]=5 [5]=6 [6]=7 [7]=8 [8]=9)\ndeclare -a a=([0]=1 [2]=3 [3]=4 [4]=5 [5]=6 [6]=7 [7]=8 [8]=9)\ndeclare -a a=([2]=3 [3]=4 [4]=5 [5]=6 [6]=7 [7]=8 [8]=9)\n' Got 'declare -a a=([0]="1" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")\ndeclare -a a=([0]="1" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")\ndeclare -a a=([0]="1" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")\ndeclare -a a=([2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")\n'

stdout:
declare -a a=([0]="1" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")
declare -a a=([0]="1" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")
declare -a a=([0]="1" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")
declare -a a=([2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")
stderr:
bash11 unset -v a[i] with out-of-bound negative index

stdout:
stderr: 
bash: line 5: unset: [-2]: bad array subscript
bash: line 6: unset: [-3]: bad array subscript
mksh11 unset -v a[i] with out-of-bound negative index

stdout:
stderr: 
ksh11 unset -v a[i] with out-of-bound negative index

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

stdout:
stderr: 
toysh11 unset -v a[i] with out-of-bound negative index

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

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush11 unset -v a[i] with out-of-bound negative index

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

stdout:
stderr: 
brush11 unset -v a[i] with out-of-bound negative index

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

stdout:
stderr: 
bash12 unset -v a[i] for max index

stdout:
declare -a a=([0]="1" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="x")
declare -a a=([0]="1" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="x")
stderr:
mksh12 unset -v a[i] for max index

stdout:
stderr: 
ksh12 unset -v a[i] for max index

[ksh stdout] Expected 'declare -a a=(1 2 3 4 5 6 7 x)\ndeclare -a a=(1 2 3 4 5 6 x)\n' Got ''
[ksh status] Expected 0, got 127

stdout:
stderr: 
E: ksh: <stdin>[6]: declare: inaccessible or not found
E: ksh: <stdin>[9]: declare: inaccessible or not found
toysh12 unset -v a[i] for max index

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

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush12 unset -v a[i] for max index

[sush stdout] Expected 'declare -a a=(1 2 3 4 5 6 7 x)\ndeclare -a a=(1 2 3 4 5 6 x)\n' Got 'declare -a a=([0]="1" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")\ndeclare -a a=([0]="1" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")\n'

stdout:
declare -a a=([0]="1" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")
declare -a a=([0]="1" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")
stderr:
brush12 unset -v a[i] for max index

[brush stdout] Expected 'declare -a a=(1 2 3 4 5 6 7 x)\ndeclare -a a=(1 2 3 4 5 6 x)\n' Got 'declare -a a=([0]="x" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")\ndeclare -a a=([0]="x" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")\n'

stdout:
declare -a a=([0]="x" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")
declare -a a=([0]="x" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8" [8]="9")
stderr:
mksh13 [[ -v a[i] ]]

stdout:
stderr: 
ksh13 [[ -v a[i] ]]

[ksh stdout] Expected '1 (expect 1)\n1 (expect 1)\n0 (expect 0)\n0 (expect 0)\n1 (expect 1)\n0 (expect 0)\n0 (expect 0)\n0 (expect 0)\n0 (expect 0)\n1 (expect 1)\n0 (expect 0)\n0 (expect 0)\n0 (expect 0)\n1 (expect 1)\n0 (expect 0)\n0 (expect 0)\n' Got '1 (expect 1)\n1 (expect 1)\n0 (expect 0)\n1 (expect 0)\n1 (expect 1)\n1 (expect 0)\n1 (expect 0)\n1 (expect 0)\n1 (expect 0)\n1 (expect 1)\n1 (expect 0)\n1 (expect 0)\n1 (expect 0)\n1 (expect 1)\n1 (expect 0)\n1 (expect 0)\n'

stdout:
1 (expect 1)
1 (expect 1)
0 (expect 0)
1 (expect 0)
1 (expect 1)
1 (expect 0)
1 (expect 0)
1 (expect 0)
1 (expect 0)
1 (expect 1)
1 (expect 0)
1 (expect 0)
1 (expect 0)
1 (expect 1)
1 (expect 0)
1 (expect 0)
stderr:
toysh13 [[ -v a[i] ]]

[toysh stdout] Expected '1 (expect 1)\n1 (expect 1)\n0 (expect 0)\n0 (expect 0)\n1 (expect 1)\n0 (expect 0)\n0 (expect 0)\n0 (expect 0)\n0 (expect 0)\n1 (expect 1)\n0 (expect 0)\n0 (expect 0)\n0 (expect 0)\n1 (expect 1)\n0 (expect 0)\n0 (expect 0)\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush13 [[ -v a[i] ]]

[sush stdout] Expected '1 (expect 1)\n1 (expect 1)\n0 (expect 0)\n0 (expect 0)\n1 (expect 1)\n0 (expect 0)\n0 (expect 0)\n0 (expect 0)\n0 (expect 0)\n1 (expect 1)\n0 (expect 0)\n0 (expect 0)\n0 (expect 0)\n1 (expect 1)\n0 (expect 0)\n0 (expect 0)\n' Got '1 (expect 1)\n1 (expect 1)\n1 (expect 0)\n1 (expect 0)\n1 (expect 1)\n1 (expect 0)\n1 (expect 0)\n1 (expect 0)\n1 (expect 0)\n1 (expect 1)\n1 (expect 0)\n1 (expect 0)\n1 (expect 0)\n1 (expect 1)\n1 (expect 0)\n1 (expect 0)\n'

stdout:
1 (expect 1)
1 (expect 1)
1 (expect 0)
1 (expect 0)
1 (expect 1)
1 (expect 0)
1 (expect 0)
1 (expect 0)
1 (expect 0)
1 (expect 1)
1 (expect 0)
1 (expect 0)
1 (expect 0)
1 (expect 1)
1 (expect 0)
1 (expect 0)
stderr:
brush13 [[ -v a[i] ]]

[brush stdout] Expected '1 (expect 1)\n1 (expect 1)\n0 (expect 0)\n0 (expect 0)\n1 (expect 1)\n0 (expect 0)\n0 (expect 0)\n0 (expect 0)\n0 (expect 0)\n1 (expect 1)\n0 (expect 0)\n0 (expect 0)\n0 (expect 0)\n1 (expect 1)\n0 (expect 0)\n0 (expect 0)\n' Got '1 (expect 1)\n1 (expect 1)\n1 (expect 0)\n1 (expect 0)\n1 (expect 1)\n1 (expect 0)\n1 (expect 0)\n1 (expect 0)\n1 (expect 0)\n1 (expect 1)\n1 (expect 0)\n1 (expect 0)\n1 (expect 0)\n1 (expect 1)\n1 (expect 0)\n1 (expect 0)\n'

stdout:
1 (expect 1)
1 (expect 1)
1 (expect 0)
1 (expect 0)
1 (expect 1)
1 (expect 0)
1 (expect 0)
1 (expect 0)
1 (expect 0)
1 (expect 1)
1 (expect 0)
1 (expect 0)
1 (expect 0)
1 (expect 1)
1 (expect 0)
1 (expect 0)
stderr:
bash14 [[ -v a[i] ]] with invalid negative index

stdout:
1 (expect 1)
1 (expect 1)
1 (expect 1)
stderr:
bash: line 4: sp1: bad array subscript
bash: line 6: sp2: bad array subscript
bash: line 9: sp3: bad array subscript
mksh14 [[ -v a[i] ]] with invalid negative index

stdout:
stderr: 
ksh14 [[ -v a[i] ]] with invalid negative index

[ksh stdout] Expected '', got '1 (expect 1)\n1 (expect 1)\n1 (expect 1)\n'
[ksh stderr] Expected ' ([[ -v sp1[-1] ]]; echo "$? (expect 1)")\n ^~~\n[ stdin ]:4: fatal: -v got index -1, which is out of bounds for array of length 0\n ([[ -v sp2[-10] ]]; echo "$? (expect 1)")\n ^~~\n[ stdin ]:6: fatal: -v got index -10, which is out of bounds for array of length 9\n ([[ -v sp3[-10] ]]; echo "$? (expect 1)")\n ^~~\n[ stdin ]:9: fatal: -v got index -10, which is out of bounds for array of length 9\n' Got ''
[ksh status] Expected 1, got 0

stdout:
1 (expect 1)
1 (expect 1)
1 (expect 1)
stderr:
toysh14 [[ -v a[i] ]] with invalid negative index

[toysh stderr] Expected ' ([[ -v sp1[-1] ]]; echo "$? (expect 1)")\n ^~~\n[ stdin ]:4: fatal: -v got index -1, which is out of bounds for array of length 0\n ([[ -v sp2[-10] ]]; echo "$? (expect 1)")\n ^~~\n[ stdin ]:6: fatal: -v got index -10, which is out of bounds for array of length 9\n ([[ -v sp3[-10] ]]; echo "$? (expect 1)")\n ^~~\n[ stdin ]:9: fatal: -v got index -10, which is out of bounds for array of length 9\n' Got 'munmap_chunk(): invalid pointer\n'
[toysh status] Expected 1, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush14 [[ -v a[i] ]] with invalid negative index

[sush stdout] Expected '', got '1 (expect 1)\n1 (expect 1)\n1 (expect 1)\n'
[sush stderr] Expected ' ([[ -v sp1[-1] ]]; echo "$? (expect 1)")\n ^~~\n[ stdin ]:4: fatal: -v got index -1, which is out of bounds for array of length 0\n ([[ -v sp2[-10] ]]; echo "$? (expect 1)")\n ^~~\n[ stdin ]:6: fatal: -v got index -10, which is out of bounds for array of length 9\n ([[ -v sp3[-10] ]]; echo "$? (expect 1)")\n ^~~\n[ stdin ]:9: fatal: -v got index -10, which is out of bounds for array of length 9\n' Got ''
[sush status] Expected 1, got 0

stdout:
1 (expect 1)
1 (expect 1)
1 (expect 1)
stderr:
brush14 [[ -v a[i] ]] with invalid negative index

[brush stdout] Expected '', got '1 (expect 1)\n1 (expect 1)\n1 (expect 1)\n'
[brush stderr] Expected ' ([[ -v sp1[-1] ]]; echo "$? (expect 1)")\n ^~~\n[ stdin ]:4: fatal: -v got index -1, which is out of bounds for array of length 0\n ([[ -v sp2[-10] ]]; echo "$? (expect 1)")\n ^~~\n[ stdin ]:6: fatal: -v got index -10, which is out of bounds for array of length 9\n ([[ -v sp3[-10] ]]; echo "$? (expect 1)")\n ^~~\n[ stdin ]:9: fatal: -v got index -10, which is out of bounds for array of length 9\n' Got ''
[brush status] Expected 1, got 0

stdout:
1 (expect 1)
1 (expect 1)
1 (expect 1)
stderr:
toysh15 ((sp[i])) and ((sp[i]++))

[toysh stdout] Expected '1\n2\n0\n0\n0\n2\n0\n0\n0\n4\n2\n2\n2\n100\n100\n100\n100\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: 1
sush15 ((sp[i])) and ((sp[i]++))

[sush stdout] Expected '1\n2\n0\n0\n0\n2\n0\n0\n0\n4\n2\n2\n2\n100\n100\n100\n100\n' Got '1\n2\n3\n4\n8\n2\n3\n4\n8\n4\n5\n6\n10\n100\n100\n100\n100\n'

stdout:
1
2
3
4
8
2
3
4
8
4
5
6
10
100
100
100
100
stderr:
bash16 ((sp[i])) and ((sp[i]++)) with invalid negative index

stdout:
0
stderr:
bash: line 6: a: bad array subscript
mksh16 ((sp[i])) and ((sp[i]++)) with invalid negative index

stdout:
stderr: 
ksh16 ((sp[i])) and ((sp[i]++)) with invalid negative index

[ksh stderr] Expected ' echo $((a[-10]))\n ^\n[ stdin ]:6: Index -10 out of bounds for array of length 9\n' Got ''

stdout:
0
stderr:
toysh16 ((sp[i])) and ((sp[i]++)) with invalid negative index

[toysh stdout] Expected '0\n', got ''
[toysh stderr] Expected ' echo $((a[-10]))\n ^\n[ stdin ]:6: Index -10 out of bounds for array of length 9\n' Got 'munmap_chunk(): invalid pointer\n'
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush16 ((sp[i])) and ((sp[i]++)) with invalid negative index

[sush stderr] Expected ' echo $((a[-10]))\n ^\n[ stdin ]:6: Index -10 out of bounds for array of length 9\n' Got ''

stdout:
0
stderr:
brush16 ((sp[i])) and ((sp[i]++)) with invalid negative index

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

stdout:
stderr: 
ERROR error: arithmetic evaluation error: failed to access array
mksh17 ${sp[i]}

stdout:
stderr: 
ksh17 ${sp[i]}

[ksh stdout] Expected "sp[0]: '1', 1, set.\nsp[1]: '2', 2, set.\nsp[8]: '9', 9, set.\nsp[2]: '', (empty), .\nsp[3]: '', (empty), .\nsp[7]: '', (empty), .\nsp[-1]: '9'.\nsp[-2]: ''.\nsp[-3]: '7'.\nsp[-4]: '6'.\nsp[-9]: '1'.\n" Got "sp[0]: '{1..9}', {1..9}, set.\nsp[1]: '', (empty), .\nsp[8]: '', (empty), .\nsp[2]: '', (empty), .\nsp[3]: '', (empty), .\nsp[7]: '', (empty), .\nsp[-1]: ''.\nsp[-2]: ''.\nsp[-3]: ''.\nsp[-4]: ''.\nsp[-9]: ''.\n"

stdout:
sp[0]: '{1..9}', {1..9}, set.
sp[1]: '', (empty), .
sp[8]: '', (empty), .
sp[2]: '', (empty), .
sp[3]: '', (empty), .
sp[7]: '', (empty), .
sp[-1]: ''.
sp[-2]: ''.
sp[-3]: ''.
sp[-4]: ''.
sp[-9]: ''.
stderr:
toysh17 ${sp[i]}

[toysh stdout] Expected "sp[0]: '1', 1, set.\nsp[1]: '2', 2, set.\nsp[8]: '9', 9, set.\nsp[2]: '', (empty), .\nsp[3]: '', (empty), .\nsp[7]: '', (empty), .\nsp[-1]: '9'.\nsp[-2]: ''.\nsp[-3]: '7'.\nsp[-4]: '6'.\nsp[-9]: '1'.\n" Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush17 ${sp[i]}

[sush stdout] Expected "sp[0]: '1', 1, set.\nsp[1]: '2', 2, set.\nsp[8]: '9', 9, set.\nsp[2]: '', (empty), .\nsp[3]: '', (empty), .\nsp[7]: '', (empty), .\nsp[-1]: '9'.\nsp[-2]: ''.\nsp[-3]: '7'.\nsp[-4]: '6'.\nsp[-9]: '1'.\n" Got "sp[0]: '1', 1, set.\nsp[1]: '2', 2, set.\nsp[8]: '9', 9, set.\nsp[2]: '3', 3, set.\nsp[3]: '4', 4, set.\nsp[7]: '8', 8, set.\nsp[-1]: ''.\nsp[-2]: ''.\nsp[-3]: ''.\nsp[-4]: ''.\nsp[-9]: ''.\n"

stdout:
sp[0]: '1', 1, set.
sp[1]: '2', 2, set.
sp[8]: '9', 9, set.
sp[2]: '3', 3, set.
sp[3]: '4', 4, set.
sp[7]: '8', 8, set.
sp[-1]: ''.
sp[-2]: ''.
sp[-3]: ''.
sp[-4]: ''.
sp[-9]: ''.
stderr:
brush17 ${sp[i]}

[brush stdout] Expected "sp[0]: '1', 1, set.\nsp[1]: '2', 2, set.\nsp[8]: '9', 9, set.\nsp[2]: '', (empty), .\nsp[3]: '', (empty), .\nsp[7]: '', (empty), .\nsp[-1]: '9'.\nsp[-2]: ''.\nsp[-3]: '7'.\nsp[-4]: '6'.\nsp[-9]: '1'.\n" Got "sp[0]: '1', 1, set.\nsp[1]: '2', 2, set.\nsp[8]: '9', 9, set.\nsp[2]: '', (empty), .\nsp[3]: '', (empty), .\nsp[7]: '', (empty), .\nsp[-1]: '6'.\nsp[-2]: '5'.\nsp[-3]: ''.\nsp[-4]: ''.\nsp[-9]: ''.\n"

stdout:
sp[0]: '1', 1, set.
sp[1]: '2', 2, set.
sp[8]: '9', 9, set.
sp[2]: '', (empty), .
sp[3]: '', (empty), .
sp[7]: '', (empty), .
sp[-1]: '6'.
sp[-2]: '5'.
sp[-3]: ''.
sp[-4]: ''.
sp[-9]: ''.
stderr:
bash18 ${sp[i]} with negative invalid index

stdout:
sp[-10]: ''.
sp[-11]: ''.
sp[-19]: ''.
stderr:
bash: line 8: sp: bad array subscript
bash: line 9: sp: bad array subscript
bash: line 10: sp: bad array subscript
mksh18 ${sp[i]} with negative invalid index

stdout:
stderr: 
ksh18 ${sp[i]} with negative invalid index

[ksh stderr] Expected ' echo "sp[-10]: \'${sp[-10]}\'."\n ^~\n[ stdin ]:8: Index -10 out of bounds for array of length 9\n echo "sp[-11]: \'${sp[-11]}\'."\n ^~\n[ stdin ]:9: Index -11 out of bounds for array of length 9\n echo "sp[-19]: \'${sp[-19]}\'."\n ^~\n[ stdin ]:10: Index -19 out of bounds for array of length 9\n' Got ''

stdout:
sp[-10]: ''.
sp[-11]: ''.
sp[-19]: ''.
stderr:
toysh18 ${sp[i]} with negative invalid index

[toysh stdout] Expected "sp[-10]: ''.\nsp[-11]: ''.\nsp[-19]: ''.\n", got ''
[toysh stderr] Expected ' echo "sp[-10]: \'${sp[-10]}\'."\n ^~\n[ stdin ]:8: Index -10 out of bounds for array of length 9\n echo "sp[-11]: \'${sp[-11]}\'."\n ^~\n[ stdin ]:9: Index -11 out of bounds for array of length 9\n echo "sp[-19]: \'${sp[-19]}\'."\n ^~\n[ stdin ]:10: Index -19 out of bounds for array of length 9\n' Got 'munmap_chunk(): invalid pointer\n'
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush18 ${sp[i]} with negative invalid index

[sush stderr] Expected ' echo "sp[-10]: \'${sp[-10]}\'."\n ^~\n[ stdin ]:8: Index -10 out of bounds for array of length 9\n echo "sp[-11]: \'${sp[-11]}\'."\n ^~\n[ stdin ]:9: Index -11 out of bounds for array of length 9\n echo "sp[-19]: \'${sp[-19]}\'."\n ^~\n[ stdin ]:10: Index -19 out of bounds for array of length 9\n' Got ''

stdout:
sp[-10]: ''.
sp[-11]: ''.
sp[-19]: ''.
stderr:
brush18 ${sp[i]} with negative invalid index

[brush stderr] Expected ' echo "sp[-10]: \'${sp[-10]}\'."\n ^~\n[ stdin ]:8: Index -10 out of bounds for array of length 9\n echo "sp[-11]: \'${sp[-11]}\'."\n ^~\n[ stdin ]:9: Index -11 out of bounds for array of length 9\n echo "sp[-19]: \'${sp[-19]}\'."\n ^~\n[ stdin ]:10: Index -19 out of bounds for array of length 9\n' Got ''

stdout:
sp[-10]: ''.
sp[-11]: ''.
sp[-19]: ''.
stderr:
mksh19 ${a[@]:offset:length}

stdout:
stderr: 
ksh19 ${a[@]:offset:length}

[ksh stdout] Expected '==== ${a[@]:offset} ====\n[v0 v1 v5 v6 v8 v9][v0 v1 v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v9][v9]\n[][]\n[][]\n==== ${a[@]:negative} ====\n[v9][v9]\n[v8 v9][v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v1 v5 v6 v8 v9][v1 v5 v6 v8 v9]\n[v0 v1 v5 v6 v8 v9][v0 v1 v5 v6 v8 v9]\n[][]\n[][]\n==== ${a[@]:offset:length} ====\n[][]\n[v0][v0]\n[v0 v1 v5][v0 v1 v5]\n[v5][v5]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[][]\n[v9][v9]\n[v9][v9]\n[][]\n' Got '==== ${a[@]:offset} ====\n'
[ksh status] Expected 0, got 1

stdout:
==== ${a[@]:offset} ====
stderr:
E: ksh: <stdin>[7]: ${a[@]: 0}: bad substitution
toysh19 ${a[@]:offset:length}

[toysh stdout] Expected '==== ${a[@]:offset} ====\n[v0 v1 v5 v6 v8 v9][v0 v1 v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v9][v9]\n[][]\n[][]\n==== ${a[@]:negative} ====\n[v9][v9]\n[v8 v9][v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v1 v5 v6 v8 v9][v1 v5 v6 v8 v9]\n[v0 v1 v5 v6 v8 v9][v0 v1 v5 v6 v8 v9]\n[][]\n[][]\n==== ${a[@]:offset:length} ====\n[][]\n[v0][v0]\n[v0 v1 v5][v0 v1 v5]\n[v5][v5]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[][]\n[v9][v9]\n[v9][v9]\n[][]\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush19 ${a[@]:offset:length}

[sush stdout] Expected '==== ${a[@]:offset} ====\n[v0 v1 v5 v6 v8 v9][v0 v1 v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v9][v9]\n[][]\n[][]\n==== ${a[@]:negative} ====\n[v9][v9]\n[v8 v9][v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v1 v5 v6 v8 v9][v1 v5 v6 v8 v9]\n[v0 v1 v5 v6 v8 v9][v0 v1 v5 v6 v8 v9]\n[][]\n[][]\n==== ${a[@]:offset:length} ====\n[][]\n[v0][v0]\n[v0 v1 v5][v0 v1 v5]\n[v5][v5]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[][]\n[v9][v9]\n[v9][v9]\n[][]\n' Got '==== ${a[@]:offset} ====\n[v0 v1 v2 v3 v4 v5 v6 v7 v8 v9][v0 v1 v2 v3 v4 v5 v6 v7 v8 v9]\n[v2 v3 v4 v5 v6 v7 v8 v9][v2 v3 v4 v5 v6 v7 v8 v9]\n[v3 v4 v5 v6 v7 v8 v9][v3 v4 v5 v6 v7 v8 v9]\n[v5 v6 v7 v8 v9][v5 v6 v7 v8 v9]\n[v9][v9]\n[][]\n[][]\n==== ${a[@]:negative} ====\n[v9][v9]\n[v8 v9][v8 v9]\n[v5 v6 v7 v8 v9][v5 v6 v7 v8 v9]\n[v1 v2 v3 v4 v5 v6 v7 v8 v9][v1 v2 v3 v4 v5 v6 v7 v8 v9]\n[v0 v1 v2 v3 v4 v5 v6 v7 v8 v9][v0 v1 v2 v3 v4 v5 v6 v7 v8 v9]\n[][]\n[][]\n==== ${a[@]:offset:length} ====\n[][]\n[v0][v0]\n[v0 v1 v2][v0 v1 v2]\n[v2][v2]\n[v2 v3 v4 v5][v2 v3 v4 v5]\n[v3 v4 v5 v6][v3 v4 v5 v6]\n[v5 v6 v7 v8][v5 v6 v7 v8]\n[][]\n[v9][v9]\n[v9][v9]\n[][]\n'

stdout:
==== ${a[@]:offset} ====
[v0 v1 v2 v3 v4 v5 v6 v7 v8 v9][v0 v1 v2 v3 v4 v5 v6 v7 v8 v9]
[v2 v3 v4 v5 v6 v7 v8 v9][v2 v3 v4 v5 v6 v7 v8 v9]
[v3 v4 v5 v6 v7 v8 v9][v3 v4 v5 v6 v7 v8 v9]
[v5 v6 v7 v8 v9][v5 v6 v7 v8 v9]
[v9][v9]
[][]
[][]
==== ${a[@]:negative} ====
[v9][v9]
[v8 v9][v8 v9]
[v5 v6 v7 v8 v9][v5 v6 v7 v8 v9]
[v1 v2 v3 v4 v5 v6 v7 v8 v9][v1 v2 v3 v4 v5 v6 v7 v8 v9]
[v0 v1 v2 v3 v4 v5 v6 v7 v8 v9][v0 v1 v2 v3 v4 v5 v6 v7 v8 v9]
[][]
[][]
==== ${a[@]:offset:length} ====
[][]
[v0][v0]
[v0 v1 v2][v0 v1 v2]
[v2][v2]
[v2 v3 v4 v5][v2 v3 v4 v5]
[v3 v4 v5 v6][v3 v4 v5 v6]
[v5 v6 v7 v8][v5 v6 v7 v8]
[][]
[v9][v9]
[v9][v9]
[][]
stderr:
brush19 ${a[@]:offset:length}

[brush stdout] Expected '==== ${a[@]:offset} ====\n[v0 v1 v5 v6 v8 v9][v0 v1 v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v9][v9]\n[][]\n[][]\n==== ${a[@]:negative} ====\n[v9][v9]\n[v8 v9][v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v1 v5 v6 v8 v9][v1 v5 v6 v8 v9]\n[v0 v1 v5 v6 v8 v9][v0 v1 v5 v6 v8 v9]\n[][]\n[][]\n==== ${a[@]:offset:length} ====\n[][]\n[v0][v0]\n[v0 v1 v5][v0 v1 v5]\n[v5][v5]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[][]\n[v9][v9]\n[v9][v9]\n[][]\n' Got '==== ${a[@]:offset} ====\n[v0 v1 v5 v6 v8 v9][v0 v1 v5 v6 v8 v9]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v6 v8 v9][v6 v8 v9]\n[v9][v9]\n[][]\n[][]\n[][]\n==== ${a[@]:negative} ====\n[v9][v9]\n[v8 v9][v8 v9]\n[v1 v5 v6 v8 v9][v1 v5 v6 v8 v9]\n[][]\n[][]\n[][]\n[][]\n==== ${a[@]:offset:length} ====\n[][]\n[v0][v0]\n[v0 v1 v5][v0 v1 v5]\n[v5][v5]\n[v5 v6 v8 v9][v5 v6 v8 v9]\n[v6 v8 v9][v6 v8 v9]\n[v9][v9]\n[][]\n[][]\n[][]\n[][]\n'

stdout:
==== ${a[@]:offset} ====
[v0 v1 v5 v6 v8 v9][v0 v1 v5 v6 v8 v9]
[v5 v6 v8 v9][v5 v6 v8 v9]
[v6 v8 v9][v6 v8 v9]
[v9][v9]
[][]
[][]
[][]
==== ${a[@]:negative} ====
[v9][v9]
[v8 v9][v8 v9]
[v1 v5 v6 v8 v9][v1 v5 v6 v8 v9]
[][]
[][]
[][]
[][]
==== ${a[@]:offset:length} ====
[][]
[v0][v0]
[v0 v1 v5][v0 v1 v5]
[v5][v5]
[v5 v6 v8 v9][v5 v6 v8 v9]
[v6 v8 v9][v6 v8 v9]
[v9][v9]
[][]
[][]
[][]
[][]
stderr:
mksh20 ${@:offset:length}

stdout:
stderr: 
ksh20 ${@:offset:length}

[ksh stdout] Expected '==== ${@:offset:length} ====\n[$SH v1 v2][$SH v1 v2]\n[v1 v2 v3][v1 v2 v3]\n[v3 v4 v5][v3 v4 v5]\n[v5 v6 v7 v8 v9][v5 v6 v7 v8 v9]\n==== ${@:negative} ====\n[v9][v9]\n[v7 v8 v9][v7 v8 v9]\n[v1 v2 v3 v4 v5 v6 v7 v8 v9][v1 v2 v3 v4 v5 v6 v7 v8 v9]\n[$SH v1 v2 v3 v4 v5 v6 v7 v8 v9][$SH v1 v2 v3 v4 v5 v6 v7 v8 v9]\n[][]\n[v7 v8][v7 v8]\n[v1 v2 v3 v4][v1 v2 v3 v4]\n[$SH v1 v2 v3][$SH v1 v2 v3]\n[][]\n' Got '==== ${@:offset:length} ====\n'

stdout:
==== ${@:offset:length} ====
stderr:
E: ksh: <stdin>[22]: ${*: 0:3}: bad substitution
toysh20 ${@:offset:length}

[toysh stdout] Expected '==== ${@:offset:length} ====\n[$SH v1 v2][$SH v1 v2]\n[v1 v2 v3][v1 v2 v3]\n[v3 v4 v5][v3 v4 v5]\n[v5 v6 v7 v8 v9][v5 v6 v7 v8 v9]\n==== ${@:negative} ====\n[v9][v9]\n[v7 v8 v9][v7 v8 v9]\n[v1 v2 v3 v4 v5 v6 v7 v8 v9][v1 v2 v3 v4 v5 v6 v7 v8 v9]\n[$SH v1 v2 v3 v4 v5 v6 v7 v8 v9][$SH v1 v2 v3 v4 v5 v6 v7 v8 v9]\n[][]\n[v7 v8][v7 v8]\n[v1 v2 v3 v4][v1 v2 v3 v4]\n[$SH v1 v2 v3][$SH v1 v2 v3]\n[][]\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
bash21 ${a[@]:BigInt}

stdout:
stderr: 
mksh21 ${a[@]:BigInt}

stdout:
stderr: 
ksh21 ${a[@]:BigInt}

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

stdout:
stderr: 
E: ksh: <stdin>[25]: ${a[@]: -1}: bad substitution
toysh21 ${a[@]:BigInt}

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

stdout:
stderr: 
munmap_chunk(): invalid pointer
brush21 ${a[@]:BigInt}

[brush stdout] Expected '[x][x]\n[y x][y x]\n[z y x][z y x]\n[z y x][z y x]\n' Got '[x][x]\n[y x][y x]\n[z y x][z y x]\n[3 z y x][3 z y x]\n'

stdout:
[x][x]
[y x][y x]
[z y x][z y x]
[3 z y x][3 z y x]
stderr:
osh21 ${a[@]:BigInt}

[osh stdout] Expected '[x][x]\n[y x][y x]\n[z y x][z y x]\n[z y x][z y x]\n' Got '[x][x]\n[y x][y x]\n[z y x][z y x]\n[][]\n'

stdout:
[x][x]
[y x][y x]
[z y x][z y x]
[][]
stderr:
toysh22 ${a[@]}

[toysh stdout] Expected "['v0', 'v1', 'v5', 'v6', 'v8', 'v9']\n['abcv0', 'v1', 'v5', 'v6', 'v8', 'v9xyz']\n" Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: v{0,1,2,3,4,5,6,7,8,9}
sush22 ${a[@]}

[sush stdout] Expected "['v0', 'v1', 'v5', 'v6', 'v8', 'v9']\n['abcv0', 'v1', 'v5', 'v6', 'v8', 'v9xyz']\n" Got "['v0', 'v1', 'v2', 'v3', 'v4', 'v5', 'v6', 'v7', 'v8', 'v9']\n['abcv0', 'v1', 'v2', 'v3', 'v4', 'v5', 'v6', 'v7', 'v8', 'v9xyz']\n"

stdout:
['v0', 'v1', 'v2', 'v3', 'v4', 'v5', 'v6', 'v7', 'v8', 'v9']
['abcv0', 'v1', 'v2', 'v3', 'v4', 'v5', 'v6', 'v7', 'v8', 'v9xyz']
stderr:
mksh23 ${a[@]#...}

stdout:
stderr: 
ksh23 ${a[@]#...}

[ksh stdout] Expected "['0', '1', '5', '6', '8', '9']\n['abc0', '1', '5', '6', '8', '9xyz']\n['v', 'v', 'v', 'v6', 'v8', 'v9']\n['abcv', 'v', 'v', 'v6', 'v8', 'v9xyz']\n['', '', '', '', '', '']\n" Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[6]: ${a[@]#v}: bad substitution
toysh23 ${a[@]#...}

[toysh stdout] Expected "['0', '1', '5', '6', '8', '9']\n['abc0', '1', '5', '6', '8', '9xyz']\n['v', 'v', 'v', 'v6', 'v8', 'v9']\n['abcv', 'v', 'v', 'v6', 'v8', 'v9xyz']\n['', '', '', '', '', '']\n" Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush23 ${a[@]#...}

[sush stdout] Expected "['0', '1', '5', '6', '8', '9']\n['abc0', '1', '5', '6', '8', '9xyz']\n['v', 'v', 'v', 'v6', 'v8', 'v9']\n['abcv', 'v', 'v', 'v6', 'v8', 'v9xyz']\n['', '', '', '', '', '']\n" Got "['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']\n['abc0', '1', '2', '3', '4', '5', '6', '7', '8', '9xyz']\n['v', 'v', 'v', 'v', 'v', 'v', 'v6', 'v7', 'v8', 'v9']\n['abcv', 'v', 'v', 'v', 'v', 'v', 'v6', 'v7', 'v8', 'v9xyz']\n['', '', '', '', '', '', '', '', '', '']\n"

stdout:
['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
['abc0', '1', '2', '3', '4', '5', '6', '7', '8', '9xyz']
['v', 'v', 'v', 'v', 'v', 'v', 'v6', 'v7', 'v8', 'v9']
['abcv', 'v', 'v', 'v', 'v', 'v', 'v6', 'v7', 'v8', 'v9xyz']
['', '', '', '', '', '', '', '', '', '']
stderr:
mksh24 ${a[@]/pat/rep}

stdout:
stderr: 
ksh24 ${a[@]/pat/rep}

[ksh stdout] Expected "['0', '1', '5', '6', '8', '9']\n['', '', '', '', '', '']\n['0', '1', '5', '6', '8', '9']\n['v', 'v', 'v', 'v', 'v', 'v']\n['x0', 'x1', 'x5', 'x6', 'x8', 'x9']\n['x0', 'x1', 'x5', 'x6', 'x8', 'x9']\n['vD', 'vD', 'vD', 'v6', 'v8', 'v9']\n['_0', '_1', '_5', '__', '__', '__']\n" Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[6]: ${a[@]/?}: bad substitution
toysh24 ${a[@]/pat/rep}

[toysh stdout] Expected "['0', '1', '5', '6', '8', '9']\n['', '', '', '', '', '']\n['0', '1', '5', '6', '8', '9']\n['v', 'v', 'v', 'v', 'v', 'v']\n['x0', 'x1', 'x5', 'x6', 'x8', 'x9']\n['x0', 'x1', 'x5', 'x6', 'x8', 'x9']\n['vD', 'vD', 'vD', 'v6', 'v8', 'v9']\n['_0', '_1', '_5', '__', '__', '__']\n" Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush24 ${a[@]/pat/rep}

[sush stdout] Expected "['0', '1', '5', '6', '8', '9']\n['', '', '', '', '', '']\n['0', '1', '5', '6', '8', '9']\n['v', 'v', 'v', 'v', 'v', 'v']\n['x0', 'x1', 'x5', 'x6', 'x8', 'x9']\n['x0', 'x1', 'x5', 'x6', 'x8', 'x9']\n['vD', 'vD', 'vD', 'v6', 'v8', 'v9']\n['_0', '_1', '_5', '__', '__', '__']\n" Got "['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']\n['', '', '', '', '', '', '', '', '', '']\n['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']\n['v', 'v', 'v', 'v', 'v', 'v', 'v', 'v', 'v', 'v']\n['x0', 'x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7', 'x8', 'x9']\n['x0', 'x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7', 'x8', 'x9']\n['vD', 'vD', 'vD', 'vD', 'vD', 'vD', 'v6', 'v7', 'v8', 'v9']\n['_0', '_1', '_2', '_3', '_4', '_5', '__', '__', '__', '__']\n"

stdout:
['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
['', '', '', '', '', '', '', '', '', '']
['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
['v', 'v', 'v', 'v', 'v', 'v', 'v', 'v', 'v', 'v']
['x0', 'x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7', 'x8', 'x9']
['x0', 'x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7', 'x8', 'x9']
['vD', 'vD', 'vD', 'vD', 'vD', 'vD', 'v6', 'v7', 'v8', 'v9']
['_0', '_1', '_2', '_3', '_4', '_5', '__', '__', '__', '__']
stderr:
bash25 ${a[@]@P}, ${a[@]@Q}, and ${a[@]@a}

stdout:
['v0', 'v1', 'v5', 'v6', 'v8', 'v9']
['v0 v1 v5 v6 v8 v9']
["'v0'", "'v1'", "'v5'", "'v6'", "'v8'", "'v9'"]
["'v0' 'v1' 'v5' 'v6' 'v8' 'v9'"]
['a', 'a', 'a', 'a', 'a', 'a']
['a a a a a a']
stderr:
mksh25 ${a[@]@P}, ${a[@]@Q}, and ${a[@]@a}

stdout:
stderr: 
ksh25 ${a[@]@P}, ${a[@]@Q}, and ${a[@]@a}

[ksh stdout] Expected "['v0', 'v1', 'v5', 'v6', 'v8', 'v9']\n['v0 v1 v5 v6 v8 v9']\n['v0', 'v1', 'v5', 'v6', 'v8', 'v9']\n['v0 v1 v5 v6 v8 v9']\n['a', 'a', 'a', 'a', 'a', 'a']\n['a a a a a a']\n" Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[6]: ${a[@]@P}: bad substitution
toysh25 ${a[@]@P}, ${a[@]@Q}, and ${a[@]@a}

[toysh stdout] Expected "['v0', 'v1', 'v5', 'v6', 'v8', 'v9']\n['v0 v1 v5 v6 v8 v9']\n['v0', 'v1', 'v5', 'v6', 'v8', 'v9']\n['v0 v1 v5 v6 v8 v9']\n['a', 'a', 'a', 'a', 'a', 'a']\n['a a a a a a']\n" Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush25 ${a[@]@P}, ${a[@]@Q}, and ${a[@]@a}

[sush stdout] Expected "['v0', 'v1', 'v5', 'v6', 'v8', 'v9']\n['v0 v1 v5 v6 v8 v9']\n['v0', 'v1', 'v5', 'v6', 'v8', 'v9']\n['v0 v1 v5 v6 v8 v9']\n['a', 'a', 'a', 'a', 'a', 'a']\n['a a a a a a']\n" Got ''
[sush status] Expected 0, got 1

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: `${a[@]@P}': bad substitution
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: `${a[*]@P}': bad substitution
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 8: `${a[@]@Q}': bad substitution
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: `${a[*]@Q}': bad substitution
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 10: `${a[@]@a}': bad substitution
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 11: `${a[*]@a}': bad substitution
brush25 ${a[@]@P}, ${a[@]@Q}, and ${a[@]@a}

[brush stdout] Expected "['v0', 'v1', 'v5', 'v6', 'v8', 'v9']\n['v0 v1 v5 v6 v8 v9']\n['v0', 'v1', 'v5', 'v6', 'v8', 'v9']\n['v0 v1 v5 v6 v8 v9']\n['a', 'a', 'a', 'a', 'a', 'a']\n['a a a a a a']\n" Got '[\'v0\', \'v1\', \'v5\', \'v6\', \'v8\', \'v9\']\n[\'v0 v1 v5 v6 v8 v9\']\n["\'v0\'", "\'v1\'", "\'v5\'", "\'v6\'", "\'v8\'", "\'v9\'"]\n["\'v0\' \'v1\' \'v5\' \'v6\' \'v8\' \'v9\'"]\n[\'a\']\n[\'a\']\n'

stdout:
['v0', 'v1', 'v5', 'v6', 'v8', 'v9']
['v0 v1 v5 v6 v8 v9']
["'v0'", "'v1'", "'v5'", "'v6'", "'v8'", "'v9'"]
["'v0' 'v1' 'v5' 'v6' 'v8' 'v9'"]
['a']
['a']
stderr:
toysh26 ${a[@]-unset}, ${a[@]:-empty}, etc.

[toysh stdout] Expected 'a1 unset: [unset]\na1 empty: [empty]\na2 unset: []\na2 empty: [empty]\na3 unset: [ ]\na3 empty: [ ]\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: a2=
sush26 ${a[@]-unset}, ${a[@]:-empty}, etc.

[sush stdout] Expected 'a1 unset: [unset]\na1 empty: [empty]\na2 unset: []\na2 empty: [empty]\na3 unset: [ ]\na3 empty: [ ]\n' Got 'a1 unset: []\na1 empty: []\na2 unset: []\na2 empty: []\na3 unset: [ ]\na3 empty: [ ]\n'

stdout:
a1 unset: []
a1 empty: []
a2 unset: []
a2 empty: []
a3 unset: [ ]
a3 empty: [ ]
stderr:
brush26 ${a[@]-unset}, ${a[@]:-empty}, etc.

[brush stdout] Expected 'a1 unset: [unset]\na1 empty: [empty]\na2 unset: []\na2 empty: [empty]\na3 unset: [ ]\na3 empty: [ ]\n' Got 'a1 unset: []\na1 empty: [empty]\na2 unset: []\na2 empty: [empty]\na3 unset: [ ]\na3 empty: [empty]\n'

stdout:
a1 unset: []
a1 empty: [empty]
a2 unset: []
a2 empty: [empty]
a3 unset: [ ]
a3 empty: [empty]
stderr:
toysh27 ${a-}

[toysh stdout] Expected ', (unset), (empty);\n, , (empty);\nfoo, foo, foo;\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: a2=
mksh28 ${!a[0]}

stdout:
stderr: 
ksh28 ${!a[0]}

[ksh stdout] Expected 'hello, world\n', got 'a[0], a[1]\n'

stdout:
a[0], a[1]
stderr:
toysh28 ${!a[0]}

[toysh stdout] Expected 'hello, world\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
mksh29 ${!a[@]}

stdout:
stderr: 
ksh29 ${!a[@]}

[ksh stdout] Expected "['0', '1', '2', '5', '6', '8']\n", got "['0']\n"

stdout:
['0']
stderr:
toysh29 ${!a[@]}

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

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush29 ${!a[@]}

[sush stdout] Expected "['0', '1', '2', '5', '6', '8']\n", got "['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']\n"

stdout:
['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
stderr:
toysh30 "${a[*]}"

[toysh stdout] Expected 'v0 v1 v2 v5 v6 v8\nv0v1v2v5v6v8\nv0/v1/v2/v5/v6/v8\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: v{0,1,2,3,4,5,6,7,8,9}
sush30 "${a[*]}"

[sush stdout] Expected 'v0 v1 v2 v5 v6 v8\nv0v1v2v5v6v8\nv0/v1/v2/v5/v6/v8\n' Got 'v0 v1 v2 v3 v4 v5 v6 v7 v8 v9\nv0v1v2v3v4v5v6v7v8v9\nv0/v1/v2/v3/v4/v5/v6/v7/v8/v9\n'

stdout:
v0 v1 v2 v3 v4 v5 v6 v7 v8 v9
v0v1v2v3v4v5v6v7v8v9
v0/v1/v2/v3/v4/v5/v6/v7/v8/v9
stderr:
brush30 "${a[*]}"

[brush stdout] Expected 'v0 v1 v2 v5 v6 v8\nv0v1v2v5v6v8\nv0/v1/v2/v5/v6/v8\n' Got 'v0 v1 v2 v5 v6 v8\nv0 v1 v2 v5 v6 v8\nv0/v1/v2/v5/v6/v8\n'

stdout:
v0 v1 v2 v5 v6 v8
v0 v1 v2 v5 v6 v8
v0/v1/v2/v5/v6/v8
stderr:
mksh31 compgen -F _set_COMPREPLY

stdout:
stderr: 
ksh31 compgen -F _set_COMPREPLY

[ksh stdout] Expected '0\n1\n3\n5\n7\n8\n9\n', got ''
[ksh status] Expected 0, got 127

stdout:
stderr: 
E: ksh: <stdin>[8]: compgen: inaccessible or not found
toysh31 compgen -F _set_COMPREPLY

[toysh stdout] Expected '0\n1\n3\n5\n7\n8\n9\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush31 compgen -F _set_COMPREPLY

[sush stdout] Expected '0\n1\n3\n5\n7\n8\n9\n', got ''
[sush status] Expected 0, got 2

stdout:
stderr: 
sush: compgen: -F: invalid option
bash32 compadjust

stdout:
stderr: 
mksh32 compadjust

stdout:
stderr: 
ksh32 compadjust

[ksh stdout] Expected "['world!', 'Bash', '3']\n['echo', 'Hello,', 'Bash', 'world!']\n" Got "['', '', '']\n[]\n"

stdout:
['', '', '']
[]
stderr:
E: ksh: <stdin>[4]: compadjust: inaccessible or not found
toysh32 compadjust

[toysh stdout] Expected "['world!', 'Bash', '3']\n['echo', 'Hello,', 'Bash', 'world!']\n" Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush32 compadjust

[sush stdout] Expected "['world!', 'Bash', '3']\n['echo', 'Hello,', 'Bash', 'world!']\n" Got "['', '', '']\n[]\n"

stdout:
['', '', '']
[]
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: compadjust: command not found
brush32 compadjust

[brush stdout] Expected "['world!', 'Bash', '3']\n['echo', 'Hello,', 'Bash', 'world!']\n" Got "['', '', '']\n[]\n"

stdout:
['', '', '']
[]
stderr:
compadjust: command not found
bash33 (YSH) @[sp] and @sp

stdout:
stderr: 
mksh33 (YSH) @[sp] and @sp

stdout:
stderr: 
ksh33 (YSH) @[sp] and @sp

[ksh stdout] Expected "['0', '3', '5']\n['0', '3', '5']\n", got "['@[a]']\n['@a']\n"

stdout:
['@[a]']
['@a']
stderr:
E: ksh: <stdin>[6]: shopt: inaccessible or not found
toysh33 (YSH) @[sp] and @sp

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

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush33 (YSH) @[sp] and @sp

[sush stdout] Expected "['0', '3', '5']\n['0', '3', '5']\n", got "['@[a]']\n['@a']\n"

stdout:
['@[a]']
['@a']
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: shopt: parse_at: not supported yet
brush33 (YSH) @[sp] and @sp

[brush stdout] Expected "['0', '3', '5']\n['0', '3', '5']\n", got "['@[a]']\n['@a']\n"

stdout:
['@[a]']
['@a']
stderr:
shopt: parse_at: invalid shell option name
bash34 (YSH) $[a1 === a2]

stdout:
stderr: 
mksh34 (YSH) $[a1 === a2]

stdout:
stderr: 
ksh34 (YSH) $[a1 === a2]

[ksh stdout] Expected 'true\ntrue\nfalse\nfalse\ntrue\nfalse\nfalse\n', got '$[a1 === a1]\n$[a1 === a2]\n$[a1 === a3]\n$[a1 === a4]\n$[a2 === a1]\n$[a3 === a1]\n$[a4 === a1]\n'

stdout:
$[a1 === a1]
$[a1 === a2]
$[a1 === a3]
$[a1 === a4]
$[a2 === a1]
$[a3 === a1]
$[a4 === a1]
stderr:
toysh34 (YSH) $[a1 === a2]

[toysh stdout] Expected 'true\ntrue\nfalse\nfalse\ntrue\nfalse\nfalse\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush34 (YSH) $[a1 === a2]

[sush stdout] Expected 'true\ntrue\nfalse\nfalse\ntrue\nfalse\nfalse\n', got '$[a1 === a1]\n$[a1 === a2]\n$[a1 === a3]\n$[a1 === a4]\n$[a2 === a1]\n$[a3 === a1]\n$[a4 === a1]\n'

stdout:
$[a1 === a1]
$[a1 === a2]
$[a1 === a3]
$[a1 === a4]
$[a2 === a1]
$[a3 === a1]
$[a4 === a1]
stderr:
brush34 (YSH) $[a1 === a2]

[brush stdout] Expected 'true\ntrue\nfalse\nfalse\ntrue\nfalse\nfalse\n', got '$[a1 === a1]\n$[a1 === a2]\n$[a1 === a3]\n$[a1 === a4]\n$[a2 === a1]\n$[a3 === a1]\n$[a4 === a1]\n'

stdout:
$[a1 === a1]
$[a1 === a2]
$[a1 === a3]
$[a1 === a4]
$[a2 === a1]
$[a3 === a1]
$[a4 === a1]
stderr:
bash35 (YSH) append v1 v2... (a)

stdout:
stderr: 
mksh35 (YSH) append v1 v2... (a)

stdout:
stderr: 
ksh35 (YSH) append v1 v2... (a)

[ksh stdout] Expected "(BashArray [0]='1' [2]='3' [3]='x' [4]='y' [5]='z')\n" Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[5]: syntax error: unexpected '('
toysh35 (YSH) append v1 v2... (a)

[toysh stdout] Expected "(BashArray [0]='1' [2]='3' [3]='x' [4]='y' [5]='z')\n" Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush35 (YSH) append v1 v2... (a)

[sush stdout] Expected "(BashArray [0]='1' [2]='3' [3]='x' [4]='y' [5]='z')\n" Got ''
[sush status] Expected 0, got 127

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: Unexpected token: (a)

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: =: command not found
brush35 (YSH) append v1 v2... (a)

[brush stdout] Expected "(BashArray [0]='1' [2]='3' [3]='x' [4]='y' [5]='z')\n" Got ''

stdout:
stderr: 
ERROR main: syntax error near token `
' (line 1 col 23)
=: command not found
bash36 (YSH) $[bool(a)]

stdout:
stderr: 
mksh36 (YSH) $[bool(a)]

stdout:
stderr: 
ksh36 (YSH) $[bool(a)]

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

stdout:
stderr: 
E: ksh: <stdin>[9]: syntax error: unexpected '('
toysh36 (YSH) $[bool(a)]

[toysh stdout] Expected 'false\ntrue\ntrue\ntrue\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush36 (YSH) $[bool(a)]

[sush stdout] Expected 'false\ntrue\ntrue\ntrue\n', got ''
[sush status] Expected 0, got 2

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 10: Unexpected token: (a1)]

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 11: Unexpected token: (a2)]

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 12: Unexpected token: (a3)]

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 13: Unexpected token: (a4)]

brush36 (YSH) $[bool(a)]

[brush stdout] Expected 'false\ntrue\ntrue\ntrue\n', got ''

stdout:
stderr: 
ERROR main: syntax error near token `]' (line 1 col 16)
ERROR main: syntax error near token `]' (line 1 col 16)
ERROR main: syntax error near token `]' (line 1 col 16)
ERROR main: syntax error near token `]' (line 1 col 16)
bash37 crash dump

stdout:
stderr: 
mksh37 crash dump

stdout:
stderr: 
ksh37 crash dump

[ksh stdout] Expected '{\n "val": {\n "type": "BashArray",\n "data": {\n "0": "0",\n "1": "1",\n "3": "3"\n }\n }\n}\n' Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[4]: syntax error: unexpected '('
toysh37 crash dump

[toysh stdout] Expected '{\n "val": {\n "type": "BashArray",\n "data": {\n "0": "0",\n "1": "1",\n "3": "3"\n }\n }\n}\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush37 crash dump

[sush stdout] Expected '{\n "val": {\n "type": "BashArray",\n "data": {\n "0": "0",\n "1": "1",\n "3": "3"\n }\n }\n}\n' Got ''
[sush status] Expected 0, got 2

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: Unexpected token: (&crash_dump)
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: Unexpected token: (crash_dump.var_stack[0].a)

brush37 crash dump

[brush stdout] Expected '{\n "val": {\n "type": "BashArray",\n "data": {\n "0": "0",\n "1": "1",\n "3": "3"\n }\n }\n}\n' Got ''

stdout:
stderr: 
ERROR error: failed to source file: -ec; i/o error: No such file or directory (os error 2)
ERROR main: syntax error near token `&' (line 1 col 12)
ERROR main: syntax error near token `
' (line 1 col 39)
bash38 Regression: a[-1]=1

stdout:
stderr: 
bash: line 3: a[-1]: bad array subscript
mksh38 Regression: a[-1]=1

stdout:
stderr: 
ksh38 Regression: a[-1]=1

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

stdout:
stderr: 
toysh38 Regression: a[-1]=1

[toysh stderr] Expected ' a[-1]=1\n ^~\n[ stdin ]:3: fatal: Index %d is out of bounds for array of length 0\n' Got 'munmap_chunk(): invalid pointer\n'
[toysh status] Expected 1, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush38 Regression: a[-1]=1

[sush stderr] Expected ' a[-1]=1\n ^~\n[ stdin ]:3: fatal: Index %d is out of bounds for array of length 0\n' Got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: TODO\n'

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: TODO
brush38 Regression: a[-1]=1

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

stdout:
stderr: 
mksh39 Initializing indexed array with ([index]=value)

stdout:
stderr: 
ksh39 Initializing indexed array with ([index]=value)

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

stdout:
stderr: 
E: ksh: <stdin>[2]: syntax error: unexpected '('
toysh39 Initializing indexed array with ([index]=value)

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

stdout:
stderr: 
munmap_chunk(): invalid pointer