Results for var-op-test.test.sh

statusbashdashashzshmkshkshtoyshsushbrushosh
pass 35202023272810192234
ok 0306100003
N-I 01304400000
BUG 2104500000
FAIL 00170092718150
total37373737373737373737
casebashdashashzshmkshkshtoyshsushbrushoshdescription
0pass N-I pass pass pass pass FAIL FAIL pass pass Lazy Evaluation of Alternative
detailsdetailsdetails
1pass pass pass pass pass pass pass pass pass pass Default value when empty
2pass pass pass pass pass pass pass pass pass pass Default value when unset
3pass pass pass ok pass pass FAIL pass pass ok Unquoted with array as default value
detailsdetailsdetails
4pass pass pass pass pass pass FAIL pass pass ok Quoted with array as default value
detailsdetails
5pass pass pass ok pass pass FAIL pass pass ok Assign default with array
detailsdetailsdetails
6pass pass pass pass pass pass pass pass pass pass Assign default value when empty
7pass pass pass pass pass pass pass pass pass pass Assign default value when unset
8pass pass pass pass pass pass pass pass pass pass ${v:+foo} Alternative value when empty
9pass pass pass pass pass pass pass pass pass pass ${v+foo} Alternative value when unset
10pass pass pass pass pass pass pass pass pass pass "${x+foo}" quoted (regression)
11pass pass pass pass pass pass FAIL pass pass pass ${s+foo} and ${s:+foo} when set -u
details
12BUG N-I FAIL pass BUG FAIL FAIL pass FAIL pass "${array[@]} with set -u (bash is outlier)
detailsdetailsdetailsdetailsdetailsdetailsdetails
13pass N-I FAIL pass pass pass FAIL FAIL FAIL pass "${undefined[@]+foo}" and "${undefined[@]:+foo}", with set -u
detailsdetailsdetailsdetailsdetails
14pass N-I FAIL BUG BUG pass FAIL pass pass pass "${a[@]+foo}" and "${a[@]:+foo}" - operators are equivalent on arrays?
detailsdetailsdetailsdetailsdetails
15pass ok FAIL ok ok FAIL FAIL pass pass pass Nix idiom ${!hooksSlice+"${!hooksSlice}"} - was workaround for obsolete bash 4.3 bug
detailsdetailsdetailsdetailsdetailsdetails
16pass pass pass pass pass pass FAIL pass pass pass ${v-foo} and ${v:-foo} when set -u
details
17pass N-I FAIL N-I pass pass FAIL FAIL FAIL pass array and - and +
detailsdetailsdetailsdetailsdetailsdetails
18pass BUG FAIL BUG pass pass pass pass FAIL pass $@ (empty) and - and +
detailsdetailsdetailsdetails
19pass pass pass ok pass pass FAIL FAIL pass pass $@ ("") and - and +
detailsdetailsdetails
20pass pass pass pass pass pass FAIL FAIL FAIL pass $@ ("" "") and - and +
detailsdetailsdetails
21pass pass FAIL pass BUG FAIL FAIL FAIL FAIL pass $* ("" "") and - and + (IFS=)
detailsdetailsdetailsdetailsdetailsdetails
22pass pass pass pass pass pass FAIL FAIL FAIL pass "$*" ("" "") and - and + (IFS=)
detailsdetailsdetails
23pass N-I FAIL BUG N-I FAIL FAIL FAIL FAIL pass assoc array and - and +
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
24pass ok FAIL pass pass pass FAIL FAIL FAIL pass Error when empty
detailsdetailsdetailsdetailsdetails
25pass ok FAIL pass pass pass FAIL FAIL FAIL pass Error when unset
detailsdetailsdetailsdetailsdetails
26pass pass pass pass pass pass pass pass pass pass Error when unset
27pass pass pass pass pass pass pass pass pass pass ${var=x} dynamic scope
28pass N-I FAIL N-I pass pass FAIL pass pass pass array ${arr[0]=x}
detailsdetailsdetailsdetails
29pass N-I FAIL pass N-I FAIL FAIL FAIL pass pass assoc array ${arr["k"]=x}
detailsdetailsdetailsdetailsdetailsdetails
30pass pass pass pass pass pass FAIL FAIL FAIL pass "\z" as arg
detailsdetailsdetails
31pass pass pass BUG BUG FAIL FAIL FAIL FAIL pass "\e" as arg
detailsdetailsdetailsdetailsdetailsdetails
32pass N-I FAIL ok pass pass FAIL FAIL pass pass op-test for ${a} and ${a[0]}
detailsdetailsdetailsdetailsdetails
33pass N-I FAIL ok pass pass FAIL FAIL FAIL pass op-test for ${a[@]} and ${a[*]}
detailsdetailsdetailsdetailsdetailsdetails
34pass N-I FAIL N-I N-I FAIL FAIL FAIL pass pass op-test for ${!array} with array="a" and array="a[0]"
detailsdetailsdetailsdetailsdetailsdetailsdetails
35BUG N-I FAIL N-I N-I FAIL FAIL FAIL FAIL pass op-test for ${!array} with array="a[@]" or array="a[*]"
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
36pass N-I FAIL pass BUG FAIL FAIL FAIL FAIL pass op-test for unquoted ${a[*]:-empty} with IFS=
detailsdetailsdetailsdetailsdetailsdetailsdetails
238 passed, 13 OK, 21 not implemented, 12 BUG, 86 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

dash0 Lazy Evaluation of Alternative

stdout:
x
0
stderr:
dash: 5: arithmetic expression: expecting primary: "i++"
toysh0 Lazy Evaluation of Alternative

[toysh stdout] Expected 'x\n0\n0\n1\n', got 'x\n0\n$((i++))\n0\n'

stdout:
x
0
$((i++))
0
stderr:
sush0 Lazy Evaluation of Alternative

[sush stdout] Expected 'x\n0\n0\n1\n', got 'x\n0\n0\n2\n'

stdout:
x
0
0
2
stderr:
zsh3 Unquoted with array as default value

stdout:
['Xx1 2 3 4xX']
['Xx1 2 3 4xX']
stderr:
toysh3 Unquoted with array as default value

[toysh stdout] Expected "['Xx1', '2', '3', '4xX']\n['Xx1', '2', '3', '4xX']\n" Got '[\'Xx"$@"xX\']\n'
[toysh status] Expected 0, got 1

stdout:
['Xx"$@"xX']
stderr:
set: bad --
main: line 3: sh: unset: =x$@x}X
osh3 Unquoted with array as default value

stdout:
['Xx1 2', '3 4xX']
['Xx1', '2', '3', '4xX']
stderr:
toysh4 Quoted with array as default value

[toysh stdout] Expected "['Xx1 2 3 4xX']\n['Xx1 2 3 4xX']\n", got '[\'Xx"$@"xX\']\n'
[toysh status] Expected 0, got 1

stdout:
['Xx"$@"xX']
stderr:
set: bad --
main: line 3: sh: unset: =x$@x}X"
osh4 Quoted with array as default value

stdout:
['Xx1 2', '3 4xX']
['Xx1 2 3 4xX']
stderr:
zsh5 Assign default with array

stdout:
['Xx1 2 3 4xX']
['x1 2 3 4x']
stderr:
toysh5 Assign default with array

[toysh stdout] Expected "['Xx1', '2', '3', '4xX']\n['x1 2 3 4x']\n", got '[\'Xx"$@"xX\']\n[\'x"$@"x\']\n'

stdout:
['Xx"$@"xX']
['x"$@"x']
stderr:
set: bad --
osh5 Assign default with array

stdout:
['Xx1 2', '3 4xX']
['x1 2 3 4x']
stderr:
toysh11 ${s+foo} and ${s:+foo} when set -u

[toysh stdout] Expected 'v=foo\nv=foo\nv=\nv=\n', got 'v=foo\nv=foo\n'
[toysh status] Expected 0, got 1

stdout:
v=foo
v=foo
stderr:
main: line 6: sh: v: bad substitution
main: line 7: sh: v: bad substitution
bash12 "${array[@]} with set -u (bash is outlier)

stdout:
empty //
undefined //
stderr:
dash12 "${array[@]} with set -u (bash is outlier)

stdout:
stderr: 
ash12 "${array[@]} with set -u (bash is outlier)

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

stdout:
stderr: 
ash: typeset: not found
ash: syntax error: unexpected "("
mksh12 "${array[@]} with set -u (bash is outlier)

stdout:
stderr: 
mksh: <stdin>[8]: empty[@]: parameter not set
ksh12 "${array[@]} with set -u (bash is outlier)

[ksh stdout] Expected 'empty //\n', got ''

stdout:
stderr: 
E: ksh: <stdin>[8]: empty[@]: parameter not set
toysh12 "${array[@]} with set -u (bash is outlier)

[toysh stdout] Expected 'empty //\n', got ''
[toysh status] Expected 1, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
brush12 "${array[@]} with set -u (bash is outlier)

[brush stdout] Expected 'empty //\n', got 'empty //\nundefined //\n'
[brush status] Expected 1, got 0

stdout:
empty //
undefined //
stderr:
dash13 "${undefined[@]+foo}" and "${undefined[@]:+foo}", with set -u

stdout:
stderr: 
ash13 "${undefined[@]+foo}" and "${undefined[@]:+foo}", with set -u

[ash stdout] Expected 'plus //\nplus colon //\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: bad substitution
toysh13 "${undefined[@]+foo}" and "${undefined[@]:+foo}", with set -u

[toysh stdout] Expected 'plus //\nplus colon //\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush13 "${undefined[@]+foo}" and "${undefined[@]:+foo}", with set -u

[sush stdout] Expected 'plus //\nplus colon //\n', got ''
[sush status] Expected 0, got 1

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: array: unbound variable
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: array: unbound variable
brush13 "${undefined[@]+foo}" and "${undefined[@]:+foo}", with set -u

[brush stdout] Expected 'plus //\nplus colon //\n', got 'plus /foo/\nplus colon //\n'

stdout:
plus /foo/
plus colon //
stderr:
dash14 "${a[@]+foo}" and "${a[@]:+foo}" - operators are equivalent on arrays?

stdout:
stderr: 
ash14 "${a[@]+foo}" and "${a[@]:+foo}" - operators are equivalent on arrays?

[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: bad substitution
zsh14 "${a[@]+foo}" and "${a[@]:+foo}" - operators are equivalent on arrays?

stdout:
+  //
+: //

+  /foo/
+: //

+  /foo/
+: /foo/

+  /foo/
+: /foo/

stderr:
mksh14 "${a[@]+foo}" and "${a[@]:+foo}" - operators are equivalent on arrays?

stdout:
+  //
+: //

+  //
+: //

+  /foo/
+: //

+  /foo/
+: /foo/

stderr:
toysh14 "${a[@]+foo}" and "${a[@]:+foo}" - operators are equivalent on arrays?

[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
dash15 Nix idiom ${!hooksSlice+"${!hooksSlice}"} - was workaround for obsolete bash 4.3 bug

stdout:
stderr: 
ash15 Nix idiom ${!hooksSlice+"${!hooksSlice}"} - was workaround for obsolete bash 4.3 bug

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

stdout:
stderr: 
ash: syntax error: bad substitution
ash: syntax error: bad substitution
zsh15 Nix idiom ${!hooksSlice+"${!hooksSlice}"} - was workaround for obsolete bash 4.3 bug

stdout:
stderr: 
mksh15 Nix idiom ${!hooksSlice+"${!hooksSlice}"} - was workaround for obsolete bash 4.3 bug

stdout:
stderr: 
ksh15 Nix idiom ${!hooksSlice+"${!hooksSlice}"} - was workaround for obsolete bash 4.3 bug

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

stdout:
stderr: 
E: ksh: <stdin>[4]: ${!hooksSlice+"${!hooksSlice}"}: bad substitution
E: ksh: <stdin>[8]: ${!hooksSlice+"${!hooksSlice}"}: bad substitution
toysh15 Nix idiom ${!hooksSlice+"${!hooksSlice}"} - was workaround for obsolete bash 4.3 bug

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

stdout:
stderr: 
munmap_chunk(): invalid pointer
toysh16 ${v-foo} and ${v:-foo} when set -u

[toysh stdout] Expected 'v=v\nv=v\nv=foo\nv=foo\n', got 'v=v\nv=v\n'
[toysh status] Expected 0, got 1

stdout:
v=v
v=v
stderr:
main: line 6: sh: v: bad substitution
main: line 7: sh: v: bad substitution
dash17 array and - and +

stdout:
stderr: 
ash17 array and - and +

[ash stdout] Expected "empty=minus\na1=\na1[0]=\na2= x\na3=3 4\n---\nempty=\na1=plus\na1[0]=plus\na2=plus\na3=plus\n---\nempty=\na1=plus\na2=plus\na3=plus\n---\n['minus']\n[]\n['']\n['plus']\n['']\n['plus']\n['', 'x']\n['plus']\n['3', '4']\n['plus']\n" Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: shopt: not found
ash: syntax error: unexpected "("
zsh17 array and - and +

stdout:
empty=
a1=
stderr:
zsh: command not found: shopt
zsh: no matches found: a1[0]=minus
toysh17 array and - and +

[toysh stdout] Expected "empty=minus\na1=\na1[0]=\na2= x\na3=3 4\n---\nempty=\na1=plus\na1[0]=plus\na2=plus\na3=plus\n---\nempty=\na1=plus\na2=plus\na3=plus\n---\n['minus']\n[]\n['']\n['plus']\n['']\n['plus']\n['', 'x']\n['plus']\n['3', '4']\n['plus']\n" Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush17 array and - and +

[sush stdout] Expected "empty=minus\na1=\na1[0]=\na2= x\na3=3 4\n---\nempty=\na1=plus\na1[0]=plus\na2=plus\na3=plus\n---\nempty=\na1=plus\na2=plus\na3=plus\n---\n['minus']\n[]\n['']\n['plus']\n['']\n['plus']\n['', 'x']\n['plus']\n['3', '4']\n['plus']\n" Got "empty=minus\na1=\na1[0]=\na2= x\na3=3 4\n---\nempty=\na1=plus\na1[0]=plus\na2=plus\na3=plus\n---\nempty=\na1=plus\na2=plus\na3=plus\n---\n[]\n[]\n[]\n[]\n['']\n['plus']\n['', 'x']\n['', 'x']\n['3', '4']\n['3', '4']\n"

stdout:
empty=minus
a1=
a1[0]=
a2= x
a3=3 4
---
empty=
a1=plus
a1[0]=plus
a2=plus
a3=plus
---
empty=
a1=plus
a2=plus
a3=plus
---
[]
[]
[]
[]
['']
['plus']
['', 'x']
['', 'x']
['3', '4']
['3', '4']
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: shopt: compat_array: not supported yet
brush17 array and - and +

[brush stdout] Expected "empty=minus\na1=\na1[0]=\na2= x\na3=3 4\n---\nempty=\na1=plus\na1[0]=plus\na2=plus\na3=plus\n---\nempty=\na1=plus\na2=plus\na3=plus\n---\n['minus']\n[]\n['']\n['plus']\n['']\n['plus']\n['', 'x']\n['plus']\n['3', '4']\n['plus']\n" Got "empty=\na1=\na1[0]=\na2= x\na3=3 4\n---\nempty=plus\na1=plus\na1[0]=plus\na2=plus\na3=plus\n---\nempty=\na1=plus\na2=plus\na3=plus\n---\n[]\n['plus']\n['']\n['plus']\n['']\n['plus']\n['', 'x']\n['plus']\n['3', '4']\n['plus']\n"

stdout:
empty=
a1=
a1[0]=
a2= x
a3=3 4
---
empty=plus
a1=plus
a1[0]=plus
a2=plus
a3=plus
---
empty=
a1=plus
a2=plus
a3=plus
---
[]
['plus']
['']
['plus']
['']
['plus']
['', 'x']
['plus']
['3', '4']
['plus']
stderr:
shopt: compat_array: invalid shell option name
dash18 $@ (empty) and - and +

stdout:
argv=
argv=plus
argv=minus
argv=
stderr:
ash18 $@ (empty) and - and +

[ash stdout] Expected 'argv=minus\nargv=\nargv=minus\nargv=\n', got 'argv=\nargv=plus\nargv=minus\nargv=\n'

stdout:
argv=
argv=plus
argv=minus
argv=
stderr:
zsh18 $@ (empty) and - and +

stdout:
argv=
argv=plus
argv=minus
argv=
stderr:
brush18 $@ (empty) and - and +

[brush stdout] Expected 'argv=minus\nargv=\nargv=minus\nargv=\n', got 'argv=\nargv=plus\nargv=minus\nargv=\n'

stdout:
argv=
argv=plus
argv=minus
argv=
stderr:
zsh19 $@ ("") and - and +

stdout:
argv=
argv=plus
argv=
argv=plus
stderr:
toysh19 $@ ("") and - and +

[toysh stdout] Expected 'argv=\nargv=plus\nargv=minus\nargv=\n', got 'argv=minus\nargv=\nargv=minus\nargv=\n'

stdout:
argv=minus
argv=
argv=minus
argv=
stderr:
set: bad --
sush19 $@ ("") and - and +

[sush stdout] Expected 'argv=\nargv=plus\nargv=minus\nargv=\n', got 'argv=minus\nargv=\nargv=minus\nargv=\n'

stdout:
argv=minus
argv=
argv=minus
argv=
stderr:
toysh20 $@ ("" "") and - and +

[toysh stdout] Expected 'argv=\nargv=plus\nargv=\nargv=plus\n', got 'argv=minus\nargv=\nargv=minus\nargv=\n'

stdout:
argv=minus
argv=
argv=minus
argv=
stderr:
set: bad --
sush20 $@ ("" "") and - and +

[sush stdout] Expected 'argv=\nargv=plus\nargv=\nargv=plus\n', got 'argv=minus\nargv=\nargv=\nargv=plus\n'

stdout:
argv=minus
argv=
argv=
argv=plus
stderr:
brush20 $@ ("" "") and - and +

[brush stdout] Expected 'argv=\nargv=plus\nargv=\nargv=plus\n', got 'argv=\nargv=plus\nargv=minus\nargv=\n'

stdout:
argv=
argv=plus
argv=minus
argv=
stderr:
ash21 $* ("" "") and - and + (IFS=)

[ash stdout] Expected 'argv=\nargv=plus\nargv=\nargv=plus\n', got 'argv=\nargv=plus\nargv=\nargv=\n'

stdout:
argv=
argv=plus
argv=
argv=
stderr:
mksh21 $* ("" "") and - and + (IFS=)

stdout:
argv=
argv=plus
argv=minus
argv=
stderr:
ksh21 $* ("" "") and - and + (IFS=)

[ksh stdout] Expected 'argv=\nargv=plus\nargv=\nargv=plus\n', got 'argv=\nargv=plus\nargv=minus\nargv=\n'

stdout:
argv=
argv=plus
argv=minus
argv=
stderr:
toysh21 $* ("" "") and - and + (IFS=)

[toysh stdout] Expected 'argv=\nargv=plus\nargv=\nargv=plus\n', got 'argv=minus\nargv=\nargv=minus\nargv=\n'

stdout:
argv=minus
argv=
argv=minus
argv=
stderr:
set: bad --
sush21 $* ("" "") and - and + (IFS=)

[sush stdout] Expected 'argv=\nargv=plus\nargv=\nargv=plus\n', got 'argv=minus\nargv=\nargv=minus\nargv=\n'

stdout:
argv=minus
argv=
argv=minus
argv=
stderr:
brush21 $* ("" "") and - and + (IFS=)

[brush stdout] Expected 'argv=\nargv=plus\nargv=\nargv=plus\n', got 'argv=\nargv=plus\nargv=minus\nargv=\n'

stdout:
argv=
argv=plus
argv=minus
argv=
stderr:
toysh22 "$*" ("" "") and - and + (IFS=)

[toysh stdout] Expected 'argv=\nargv=plus\nargv=minus\nargv=\n', got 'argv=minus\nargv=\nargv=minus\nargv=\n'

stdout:
argv=minus
argv=
argv=minus
argv=
stderr:
set: bad --
sush22 "$*" ("" "") and - and + (IFS=)

[sush stdout] Expected 'argv=\nargv=plus\nargv=minus\nargv=\n', got 'argv=minus\nargv=\nargv=minus\nargv=\n'

stdout:
argv=minus
argv=
argv=minus
argv=
stderr:
brush22 "$*" ("" "") and - and + (IFS=)

[brush stdout] Expected 'argv=\nargv=plus\nargv=minus\nargv=\n', got 'argv= \nargv=plus\nargv=minus\nargv=\n'

stdout:
argv= 
argv=plus
argv=minus
argv=
stderr:
dash23 assoc array and - and +

stdout:
stderr: 
ash23 assoc array and - and +

[ash stdout] Expected 'empty=minus\nempty=\nassoc=v\nassoc=plus\n---\nempty=minus\nempty=\nassoc=v\nassoc=plus\n' Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh23 assoc array and - and +

stdout:
empty=
empty=plus
assoc=minus
assoc=
---
empty=minus
empty=
assoc=minus
assoc=
stderr:
zsh: no matches found: [k]=v
mksh23 assoc array and - and +

stdout:
stderr: 
ksh23 assoc array and - and +

[ksh stdout] Expected 'empty=minus\nempty=\nassoc=v\nassoc=plus\n---\nempty=minus\nempty=\nassoc=v\nassoc=plus\n' Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[3]: syntax error: unexpected '('
toysh23 assoc array and - and +

[toysh stdout] Expected 'empty=minus\nempty=\nassoc=v\nassoc=plus\n---\nempty=minus\nempty=\nassoc=v\nassoc=plus\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush23 assoc array and - and +

[sush stdout] Expected 'empty=minus\nempty=\nassoc=v\nassoc=plus\n---\nempty=minus\nempty=\nassoc=v\nassoc=plus\n' Got 'empty=minus\nempty=\nassoc=minus\nassoc=\n---\nempty=minus\nempty=\nassoc=minus\nassoc=\n'

stdout:
empty=minus
empty=
assoc=minus
assoc=
---
empty=minus
empty=
assoc=minus
assoc=
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: 'k': syntax error: operand expected (error token is "'k'")
brush23 assoc array and - and +

[brush stdout] Expected 'empty=minus\nempty=\nassoc=v\nassoc=plus\n---\nempty=minus\nempty=\nassoc=v\nassoc=plus\n' Got 'empty=\nempty=plus\nassoc=v\nassoc=plus\n---\nempty=minus\nempty=\nassoc=v\nassoc=plus\n'

stdout:
empty=
empty=plus
assoc=v
assoc=plus
---
empty=minus
empty=
assoc=v
assoc=plus
stderr:
dash24 Error when empty

stdout:
stderr: 
dash: 2: empty: is empty
ash24 Error when empty

[ash status] Expected 1, got 2

stdout:
stderr: 
ash: empty: is empty
toysh24 Error when empty

[toysh stdout] Expected u'', got 'should not get here\n'
[toysh status] Expected 1, got 0

stdout:
should not get here
stderr:
main: line 2: sh: empty: 'is em'pty
sush24 Error when empty

[sush stdout] Expected u'', got 'should not get here\n'
[sush status] Expected 1, got 0

stdout:
should not get here
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: empty: is empty
brush24 Error when empty

[brush stdout] Expected u'', got 'should not get here\n'
[brush status] Expected 1, got 0

stdout:
should not get here
stderr:
ERROR error: expansion error: is empty
dash25 Error when unset

stdout:
stderr: 
dash: 1: unset: is empty
ash25 Error when unset

[ash status] Expected 1, got 2

stdout:
stderr: 
ash: unset: is empty
toysh25 Error when unset

[toysh stdout] Expected u'', got 'should not get here\n'
[toysh status] Expected 1, got 0

stdout:
should not get here
stderr:
main: line 1: sh: unset: is empty
sush25 Error when unset

[sush stdout] Expected u'', got 'should not get here\n'
[sush status] Expected 1, got 0

stdout:
should not get here
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: unset: is empty
brush25 Error when unset

[brush stdout] Expected u'', got 'should not get here\n'
[brush status] Expected 1, got 0

stdout:
should not get here
stderr:
ERROR error: expansion error: is empty
dash28 array ${arr[0]=x}

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash28 array ${arr[0]=x}

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

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh28 array ${arr[0]=x}

stdout:
0
stderr:
zsh: arr: assignment to invalid subscript range
toysh28 array ${arr[0]=x}

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

stdout:
stderr: 
main: line 1: sh: syntax error: echo
dash29 assoc array ${arr["k"]=x}

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash29 assoc array ${arr["k"]=x}

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

stdout:
stderr: 
ash: syntax error: unexpected "("
mksh29 assoc array ${arr["k"]=x}

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh29 assoc array ${arr["k"]=x}

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

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
toysh29 assoc array ${arr["k"]=x}

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

stdout:
stderr: 
main: line 1: sh: syntax error: )
sush29 assoc array ${arr["k"]=x}

[sush stdout] Expected '0\n1\n', got '0\n0\n'

stdout:
0
0
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: 'k': syntax error: operand expected (error token is "'k'")
toysh30 "\z" as arg

[toysh stdout] Expected '$\n\\(\n\\z\n"\n`\n\\\n', got '$\n(\nz\n"\n`\n\\\n'

stdout:
$
(
z
"
`
\
stderr:
sush30 "\z" as arg

[sush stdout] Expected '$\n\\(\n\\z\n"\n`\n\\\n', got '$\n(\nz\n"\n`\n\\\n'

stdout:
$
(
z
"
`
\
stderr:
brush30 "\z" as arg

[brush stdout] Expected '$\n\\(\n\\z\n"\n`\n\\\n', got '$\n(\nz\n"\n`\n\\\n'

stdout:
$
(
z
"
`
\
stderr:
zsh31 "\e" as arg

stdout:

stderr:
mksh31 "\e" as arg

stdout:

stderr:
ksh31 "\e" as arg

[ksh stdout] Expected '\\e\n', got '\x1b\n'

stdout:

stderr:
toysh31 "\e" as arg

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

stdout:
e
stderr:
sush31 "\e" as arg

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

stdout:
e
stderr:
brush31 "\e" as arg

[brush stdout] Expected '\\e\n', got 'e\n'

stdout:
e
stderr:
dash32 op-test for ${a} and ${a[0]}

stdout:
stderr: 
ash32 op-test for ${a} and ${a[0]}

[ash stdout] Expected "a : 'no-colon' 'with-colon'\na[0]: 'no-colon' 'with-colon'\na : '' 'with-colon'\na[0]: '' 'with-colon'\na : '' 'with-colon'\na[0]: '' 'with-colon'\na : '' 'with-colon'\na[0]: '' 'with-colon'\n" Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: bad function name
zsh32 op-test for ${a} and ${a[0]}

stdout:
a   : '' 'with-colon'
a[0]: 'no-colon' 'with-colon'
a   : '' 'with-colon'
a[0]: 'no-colon' 'with-colon'
a   : ' ' ' '
a[0]: 'no-colon' 'with-colon'
a   : '' 'with-colon'
a[0]: 'no-colon' 'with-colon'
stderr:
toysh32 op-test for ${a} and ${a[0]}

[toysh stdout] Expected "a : 'no-colon' 'with-colon'\na[0]: 'no-colon' 'with-colon'\na : '' 'with-colon'\na[0]: '' 'with-colon'\na : '' 'with-colon'\na[0]: '' 'with-colon'\na : '' 'with-colon'\na[0]: '' 'with-colon'\n" Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush32 op-test for ${a} and ${a[0]}

[sush stdout] Expected "a : 'no-colon' 'with-colon'\na[0]: 'no-colon' 'with-colon'\na : '' 'with-colon'\na[0]: '' 'with-colon'\na : '' 'with-colon'\na[0]: '' 'with-colon'\na : '' 'with-colon'\na[0]: '' 'with-colon'\n" Got "a : 'no-colon' 'with-colon'\na[0]: 'no-colon' 'with-colon'\n"
[sush status] Expected 0, got 127

stdout:
a   : 'no-colon' 'with-colon'
a[0]: 'no-colon' 'with-colon'
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: Unexpected token: ()
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: Unexpected token: }

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: test-hyphen: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 11: test-hyphen: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 13: test-hyphen: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 15: test-hyphen: command not found
dash33 op-test for ${a[@]} and ${a[*]}

stdout:
stderr: 
ash33 op-test for ${a[@]} and ${a[*]}

[ash stdout] Expected "a[@]: 'no-colon' 'with-colon'\na[*]: 'no-colon' 'with-colon'\na[@]: '' 'with-colon'\na[*]: '' 'with-colon'\na[@]: ' ' ' '\na[*]: ' ' ' '\na[@]: ' ' ' '\na[*]: '' 'with-colon'\n" Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: bad function name
zsh33 op-test for ${a[@]} and ${a[*]}

stdout:
a[@]: '' 'with-colon'
a[*]: '' 'with-colon'
a[@]: '' ''
a[*]: '' 'with-colon'
a[@]: ' ' ' '
a[*]: ' ' ' '
a[@]: ' ' ' '
a[*]: '' 'with-colon'
stderr:
toysh33 op-test for ${a[@]} and ${a[*]}

[toysh stdout] Expected "a[@]: 'no-colon' 'with-colon'\na[*]: 'no-colon' 'with-colon'\na[@]: '' 'with-colon'\na[*]: '' 'with-colon'\na[@]: ' ' ' '\na[*]: ' ' ' '\na[@]: ' ' ' '\na[*]: '' 'with-colon'\n" Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush33 op-test for ${a[@]} and ${a[*]}

[sush stdout] Expected "a[@]: 'no-colon' 'with-colon'\na[*]: 'no-colon' 'with-colon'\na[@]: '' 'with-colon'\na[*]: '' 'with-colon'\na[@]: ' ' ' '\na[*]: ' ' ' '\na[@]: ' ' ' '\na[*]: '' 'with-colon'\n" Got "a[@]: '' ''\na[*]: 'no-colon' 'with-colon'\n"
[sush status] Expected 0, got 127

stdout:
a[@]: '' ''
a[*]: 'no-colon' 'with-colon'
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: Unexpected token: ()
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: Unexpected token: }

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: test-hyphen: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 11: test-hyphen: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 13: test-hyphen: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 15: test-hyphen: command not found
brush33 op-test for ${a[@]} and ${a[*]}

[brush stdout] Expected "a[@]: 'no-colon' 'with-colon'\na[*]: 'no-colon' 'with-colon'\na[@]: '' 'with-colon'\na[*]: '' 'with-colon'\na[@]: ' ' ' '\na[*]: ' ' ' '\na[@]: ' ' ' '\na[*]: '' 'with-colon'\n" Got "a[@]: '' 'with-colon'\na[*]: '' 'with-colon'\na[@]: '' 'with-colon'\na[*]: '' 'with-colon'\na[@]: ' ' 'with-colon'\na[*]: ' ' 'with-colon'\na[@]: ' ' 'with-colon'\na[*]: ' ' 'with-colon'\n"

stdout:
a[@]: '' 'with-colon'
a[*]: '' 'with-colon'
a[@]: '' 'with-colon'
a[*]: '' 'with-colon'
a[@]: ' ' 'with-colon'
a[*]: ' ' 'with-colon'
a[@]: ' ' 'with-colon'
a[*]: ' ' 'with-colon'
stderr:
dash34 op-test for ${!array} with array="a" and array="a[0]"

stdout:
stderr: 
ash34 op-test for ${!array} with array="a" and array="a[0]"

[ash stdout] Expected "ref=a : 'no-colon' 'with-colon'\nref=a[0]: 'no-colon' 'with-colon'\nref=a : '' 'with-colon'\nref=a[0]: '' 'with-colon'\nref=a : '' 'with-colon'\nref=a[0]: '' 'with-colon'\nref=a : '' 'with-colon'\nref=a[0]: '' 'with-colon'\n" Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: bad function name
zsh34 op-test for ${!array} with array="a" and array="a[0]"

stdout:
stderr: 
mksh34 op-test for ${!array} with array="a" and array="a[0]"

stdout:
stderr: 
ksh34 op-test for ${!array} with array="a" and array="a[0]"

[ksh stdout] Expected "ref=a : 'no-colon' 'with-colon'\nref=a[0]: 'no-colon' 'with-colon'\nref=a : '' 'with-colon'\nref=a[0]: '' 'with-colon'\nref=a : '' 'with-colon'\nref=a[0]: '' 'with-colon'\nref=a : '' 'with-colon'\nref=a[0]: '' 'with-colon'\n" Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[11]: ${!ref-no-colon}: bad substitution
E: ksh: <stdin>[13]: ${!ref-no-colon}: bad substitution
E: ksh: <stdin>[15]: ${!ref-no-colon}: bad substitution
E: ksh: <stdin>[17]: ${!ref-no-colon}: bad substitution
toysh34 op-test for ${!array} with array="a" and array="a[0]"

[toysh stdout] Expected "ref=a : 'no-colon' 'with-colon'\nref=a[0]: 'no-colon' 'with-colon'\nref=a : '' 'with-colon'\nref=a[0]: '' 'with-colon'\nref=a : '' 'with-colon'\nref=a[0]: '' 'with-colon'\nref=a : '' 'with-colon'\nref=a[0]: '' 'with-colon'\n" Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush34 op-test for ${!array} with array="a" and array="a[0]"

[sush stdout] Expected "ref=a : 'no-colon' 'with-colon'\nref=a[0]: 'no-colon' 'with-colon'\nref=a : '' 'with-colon'\nref=a[0]: '' 'with-colon'\nref=a : '' 'with-colon'\nref=a[0]: '' 'with-colon'\nref=a : '' 'with-colon'\nref=a[0]: '' 'with-colon'\n" Got "ref=a : 'no-colon' 'with-colon'\nref=a[0]: 'no-colon' 'with-colon'\n"
[sush status] Expected 0, got 127

stdout:
ref=a   : 'no-colon' 'with-colon'
ref=a[0]: 'no-colon' 'with-colon'
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: Unexpected token: ()
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: Unexpected token: }

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 11: test-hyphen: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 13: test-hyphen: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 15: test-hyphen: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 17: test-hyphen: command not found
bash35 op-test for ${!array} with array="a[@]" or array="a[*]"

stdout:
ref=a[@]: 'no-colon' 'with-colon'
ref=a[*]: 'no-colon' 'with-colon'
ref=a[@]: '' ''
ref=a[*]: '' ''
ref=a[@]: ' ' ' '
ref=a[*]: ' ' ' '
ref=a[@]: ' ' ' '
ref=a[*]: '' ''
stderr:
dash35 op-test for ${!array} with array="a[@]" or array="a[*]"

stdout:
stderr: 
ash35 op-test for ${!array} with array="a[@]" or array="a[*]"

[ash stdout] Expected "ref=a[@]: 'no-colon' 'with-colon'\nref=a[*]: 'no-colon' 'with-colon'\nref=a[@]: '' 'with-colon'\nref=a[*]: '' 'with-colon'\nref=a[@]: ' ' ' '\nref=a[*]: ' ' ' '\nref=a[@]: ' ' ' '\nref=a[*]: '' 'with-colon'\n" Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: bad function name
zsh35 op-test for ${!array} with array="a[@]" or array="a[*]"

stdout:
stderr: 
mksh35 op-test for ${!array} with array="a[@]" or array="a[*]"

stdout:
stderr: 
ksh35 op-test for ${!array} with array="a[@]" or array="a[*]"

[ksh stdout] Expected "ref=a[@]: 'no-colon' 'with-colon'\nref=a[*]: 'no-colon' 'with-colon'\nref=a[@]: '' 'with-colon'\nref=a[*]: '' 'with-colon'\nref=a[@]: ' ' ' '\nref=a[*]: ' ' ' '\nref=a[@]: ' ' ' '\nref=a[*]: '' 'with-colon'\n" Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[11]: ${!ref-no-colon}: bad substitution
E: ksh: <stdin>[13]: ${!ref-no-colon}: bad substitution
E: ksh: <stdin>[15]: ${!ref-no-colon}: bad substitution
E: ksh: <stdin>[17]: ${!ref-no-colon}: bad substitution
toysh35 op-test for ${!array} with array="a[@]" or array="a[*]"

[toysh stdout] Expected "ref=a[@]: 'no-colon' 'with-colon'\nref=a[*]: 'no-colon' 'with-colon'\nref=a[@]: '' 'with-colon'\nref=a[*]: '' 'with-colon'\nref=a[@]: ' ' ' '\nref=a[*]: ' ' ' '\nref=a[@]: ' ' ' '\nref=a[*]: '' 'with-colon'\n" Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush35 op-test for ${!array} with array="a[@]" or array="a[*]"

[sush stdout] Expected "ref=a[@]: 'no-colon' 'with-colon'\nref=a[*]: 'no-colon' 'with-colon'\nref=a[@]: '' 'with-colon'\nref=a[*]: '' 'with-colon'\nref=a[@]: ' ' ' '\nref=a[*]: ' ' ' '\nref=a[@]: ' ' ' '\nref=a[*]: '' 'with-colon'\n" Got "ref=a[@]: 'no-colon' 'with-colon'\nref=a[*]: 'no-colon' 'with-colon'\n"
[sush status] Expected 0, got 127

stdout:
ref=a[@]: 'no-colon' 'with-colon'
ref=a[*]: 'no-colon' 'with-colon'
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: Unexpected token: ()
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: Unexpected token: }

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 11: test-hyphen: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 13: test-hyphen: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 15: test-hyphen: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 17: test-hyphen: command not found
brush35 op-test for ${!array} with array="a[@]" or array="a[*]"

[brush stdout] Expected "ref=a[@]: 'no-colon' 'with-colon'\nref=a[*]: 'no-colon' 'with-colon'\nref=a[@]: '' 'with-colon'\nref=a[*]: '' 'with-colon'\nref=a[@]: ' ' ' '\nref=a[*]: ' ' ' '\nref=a[@]: ' ' ' '\nref=a[*]: '' 'with-colon'\n" Got "ref=a[@]: '' 'with-colon'\nref=a[*]: '' 'with-colon'\nref=a[@]: '' 'with-colon'\nref=a[*]: '' 'with-colon'\nref=a[@]: ' ' 'with-colon'\nref=a[*]: ' ' 'with-colon'\nref=a[@]: ' ' 'with-colon'\nref=a[*]: ' ' 'with-colon'\n"

stdout:
ref=a[@]: '' 'with-colon'
ref=a[*]: '' 'with-colon'
ref=a[@]: '' 'with-colon'
ref=a[*]: '' 'with-colon'
ref=a[@]: ' ' 'with-colon'
ref=a[*]: ' ' 'with-colon'
ref=a[@]: ' ' 'with-colon'
ref=a[*]: ' ' 'with-colon'
stderr:
dash36 op-test for unquoted ${a[*]:-empty} with IFS=

stdout:
stderr: 
ash36 op-test for unquoted ${a[*]:-empty} with IFS=

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

stdout:
stderr: 
ash: syntax error: unexpected "("
mksh36 op-test for unquoted ${a[*]:-empty} with IFS=

stdout:
['empty']
stderr:
ksh36 op-test for unquoted ${a[*]:-empty} with IFS=

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

stdout:
['empty']
stderr:
toysh36 op-test for unquoted ${a[*]:-empty} with IFS=

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

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush36 op-test for unquoted ${a[*]:-empty} with IFS=

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

stdout:
['']
stderr:
brush36 op-test for unquoted ${a[*]:-empty} with IFS=

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

stdout:
['empty']
stderr: