Results for assign.test.sh

statusbashdashashzshmkshkshtoyshsushbrushosh
pass 36222835333421233544
ok 61108700001
N-I 1900400000
BUG 2504300000
FAIL 201900132624122
total47474747474747474747
casebashdashashzshmkshkshtoyshsushbrushoshdescription
0pass pass pass pass pass pass FAIL pass pass pass Env value doesn't persist
details
1pass pass pass pass pass pass pass pass pass pass Env value with equals
2pass pass pass pass BUG FAIL pass FAIL pass pass Env binding can use preceding bindings, but not subsequent ones
detailsdetailsdetails
3pass pass pass pass pass pass pass pass pass pass Env value with two quotes
4pass pass pass pass pass pass pass pass pass pass Env value with escaped <
5pass pass pass pass pass pass pass pass pass pass FOO=foo echo [foo]
6pass pass pass pass pass pass pass pass pass pass FOO=foo fun
7pass BUG pass pass ok pass pass FAIL pass pass Multiple temporary envs on the stack
detailsdetailsdetails
8pass pass pass pass pass pass pass pass pass pass Escaped = in command name
9pass pass pass ok ok FAIL pass pass pass pass Env binding not allowed before compound command
detailsdetailsdetails
10pass pass pass ok pass pass pass FAIL FAIL pass Trying to run keyword 'for'
detailsdetailsdetails
11pass pass pass pass pass pass pass pass pass pass Empty env binding
12pass pass pass pass pass pass pass pass pass pass Assignment doesn't do word splitting
13pass pass pass pass pass pass pass pass pass pass Assignment doesn't do glob expansion
14BUG pass pass pass pass pass FAIL pass FAIL pass Env binding in readonly/declare is NOT exported! (pitfall)
detailsdetailsdetails
15pass pass pass ok pass pass pass pass pass pass assignments / array assignments not interpreted after 'echo'
details
16ok ok FAIL pass ok FAIL FAIL FAIL FAIL pass dynamic local variables (and splitting)
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
17pass pass pass pass pass pass pass pass pass pass readonly x= gives empty string (regression)
18pass ok FAIL BUG pass pass FAIL FAIL FAIL pass 'local x' does not set variable
detailsdetailsdetailsdetailsdetailsdetails
19pass ok FAIL BUG pass pass FAIL FAIL FAIL pass 'local -a x' does not set variable
detailsdetailsdetailsdetailsdetailsdetails
20pass N-I FAIL BUG pass pass FAIL pass pass pass 'local x' and then array assignment
detailsdetailsdetailsdetails
21pass N-I FAIL pass N-I FAIL FAIL pass pass pass 'declare -A' and then dict assignment
detailsdetailsdetailsdetailsdetails
22pass pass pass pass pass pass FAIL pass pass pass declare in an if statement
details
23pass pass pass pass pass pass pass pass pass pass Modify a temporary binding
24FAIL ok FAIL ok BUG FAIL FAIL FAIL FAIL pass Reveal existence of "temp frame" (All shells disagree here!!!)
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
25pass ok FAIL ok BUG pass FAIL FAIL pass pass Test above without 'local' (which is not POSIX)
detailsdetailsdetailsdetailsdetailsdetails
26ok ok FAIL ok pass pass FAIL FAIL FAIL pass Using ${x-default} after unsetting local shadowing a global
detailsdetailsdetailsdetailsdetailsdetailsdetails
27FAIL ok FAIL ok pass FAIL FAIL FAIL FAIL pass Using ${x-default} after unsetting a temp binding shadowing a global
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
28pass BUG pass pass pass pass FAIL pass pass pass static assignment doesn't split
detailsdetails
29pass BUG pass pass pass pass FAIL FAIL pass pass aliased assignment doesn't split
detailsdetailsdetails
30ok ok pass pass ok FAIL FAIL FAIL pass pass assignment using dynamic keyword (splits in most shells, not in zsh/osh)
detailsdetailsdetailsdetailsdetailsdetails
31ok ok FAIL pass ok FAIL FAIL FAIL FAIL pass assignment using dynamic var names doesn't split
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
32pass BUG pass pass pass pass FAIL FAIL pass pass assign and glob
detailsdetailsdetails
33pass N-I FAIL pass pass pass FAIL FAIL pass pass declare and glob
detailsdetailsdetailsdetails
34ok ok FAIL pass ok FAIL FAIL FAIL FAIL pass readonly $x where x='b c'
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
35pass ok FAIL pass pass pass FAIL pass pass pass readonly a=(1 2) no_value c=(3 4) makes 'no_value' readonly
detailsdetailsdetails
36pass pass pass pass pass pass pass pass pass pass export a=1 no_value c=2
37pass BUG pass pass pass pass pass FAIL pass pass local a=loc $var c=loc
detailsdetails
38pass pass pass BUG pass pass pass FAIL pass FAIL redirect after assignment builtin (what's going on with dash/bash/mksh here?)
detailsdetailsdetails
39pass pass pass pass pass pass pass pass pass FAIL redirect after command sub (like case above but without assignment builtin)
details
40BUG pass pass pass pass pass pass FAIL pass pass redirect after bare assignment
detailsdetails
41ok N-I FAIL pass pass pass FAIL FAIL FAIL ok redirect after declare -p
detailsdetailsdetailsdetailsdetailsdetailsdetails
42pass N-I FAIL pass pass pass FAIL pass pass pass declare -a arr does not remove existing arrays (OSH regression)
detailsdetailsdetails
43pass N-I FAIL pass N-I FAIL FAIL FAIL pass pass declare -A dict does not remove existing arrays (OSH regression)
detailsdetailsdetailsdetailsdetailsdetails
44pass N-I FAIL pass N-I FAIL FAIL FAIL pass pass "readonly -a arr" and "readonly -A dict" should not not remove existing arrays
detailsdetailsdetailsdetailsdetailsdetails
45N-I N-I FAIL ok N-I FAIL FAIL FAIL FAIL pass "declare -a arr" and "readonly -a a" creates an empty array (OSH)
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
46pass N-I FAIL pass ok FAIL FAIL FAIL pass pass readonly array should not be modified by a+=(1)
detailsdetailsdetailsdetailsdetailsdetails
311 passed, 33 OK, 14 not implemented, 14 BUG, 98 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

toysh0 Env value doesn't persist

[toysh stdout] Expected 'foo\n--\n', got 'foo\n\n'

stdout:
foo

stderr:
mksh2 Env binding can use preceding bindings, but not subsequent ones

stdout:
foo
[][]
baz
stderr:
ksh2 Env binding can use preceding bindings, but not subsequent ones

[ksh stdout] Expected 'foo\n[foo][]\nbaz\n', got 'foo\n[][]\nbaz\n'

stdout:
foo
[][]
baz
stderr:
sush2 Env binding can use preceding bindings, but not subsequent ones

[sush stdout] Expected 'foo\n[foo][]\nbaz\n', got 'foo\n[foo][baz]\nbaz\n'

stdout:
foo
[foo][baz]
baz
stderr:
dash7 Multiple temporary envs on the stack

stdout:
f [] [A]
--- g() ---
None
None
None
None
p
--- f() ---
None
None
None
None
None
stderr:
mksh7 Multiple temporary envs on the stack

stdout:
f [] [A]
--- g() ---
f
[]
[A]
None
p
--- f() ---
f
[]
[A]
None
None
stderr:
sush7 Multiple temporary envs on the stack

[sush stdout] Expected 'f [] [A]\n--- g() ---\nf\n[]\n[A]\nNone\np\n--- f() ---\nf\nNone\nNone\nNone\nNone\n' Got 'f [] [A]\n--- g() ---\nNone\nNone\nNone\nNone\np\n--- f() ---\nNone\nNone\nNone\nNone\nNone\n'

stdout:
f [] [A]
--- g() ---
None
None
None
None
p
--- f() ---
None
None
None
None
None
stderr:
zsh9 Env binding not allowed before compound command

stdout:
stderr: 
zsh: parse error near `for'
mksh9 Env binding not allowed before compound command

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: 'do' unexpected
ksh9 Env binding not allowed before compound command

[ksh status] Expected 2, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected 'do'
zsh10 Trying to run keyword 'for'

stdout:
stderr: 
zsh: parse error near `for'
sush10 Trying to run keyword 'for'

[sush status] Expected 127, got 0

stdout:
stderr: 
brush10 Trying to run keyword 'for'

[brush status] Expected 127, got 2

stdout:
stderr: 
ERROR main: syntax error near token `
' (line 1 col 12)
bash14 Env binding in readonly/declare is NOT exported! (pitfall)

stdout:
v=None
v2=
stderr:
toysh14 Env binding in readonly/declare is NOT exported! (pitfall)

[toysh stdout] Expected 'v=None\nv2=foo\n', got 'v=\nv2=\n'

stdout:
v=
v2=
stderr:
sh: readonly: No such file or directory
sh: readonly: No such file or directory
brush14 Env binding in readonly/declare is NOT exported! (pitfall)

[brush stdout] Expected 'v=None\nv2=foo\n', got 'v=None\nv2=\n'

stdout:
v=None
v2=
stderr:
zsh15 assignments / array assignments not interpreted after 'echo'

stdout:
stderr: 
zsh: no matches found: b[0]=2
bash16 dynamic local variables (and splitting)

stdout:
x='y a=b'
a=''
x='y'
a='b'
stderr:
dash16 dynamic local variables (and splitting)

stdout:
x='y a=b'
a=''
x='y'
a='b'
stderr:
ash16 dynamic local variables (and splitting)

[ash stdout] Expected "x='y a=b'\na=''\nx='y a=b'\na=''\n", got "x='y a=b'\na=''\nx='y'\na='b'\n"

stdout:
x='y a=b'
a=''
x='y'
a='b'
stderr:
mksh16 dynamic local variables (and splitting)

stdout:
x='y a=b'
a=''
x='y'
a='b'
stderr:
ksh16 dynamic local variables (and splitting)

[ksh stdout] Expected "x='y a=b'\na=''\nx='y a=b'\na=''\n", got "x='y a=b'\na=''\nx='y'\na='b'\n"

stdout:
x='y a=b'
a=''
x='y'
a='b'
stderr:
toysh16 dynamic local variables (and splitting)

[toysh stdout] Expected "x='y a=b'\na=''\nx='y a=b'\na=''\n", got "x='y a=b'\na=''\nx='y a=b'\na='b'\n"

stdout:
x='y a=b'
a=''
x='y a=b'
a='b'
stderr:
sush16 dynamic local variables (and splitting)

[sush stdout] Expected "x='y a=b'\na=''\nx='y a=b'\na=''\n", got "x=''\na=''\nx=''\na=''\n"

stdout:
x=''
a=''
x=''
a=''
stderr:
brush16 dynamic local variables (and splitting)

[brush stdout] Expected "x='y a=b'\na=''\nx='y a=b'\na=''\n", got "x=''\na=''\nx=''\na=''\n"

stdout:
x=''
a=''
x=''
a=''
stderr:
dash18 'local x' does not set variable

stdout:
stderr: 
dash: 4: x: parameter not set
ash18 'local x' does not set variable

[ash status] Expected 1, got 2

stdout:
stderr: 
ash: x: parameter not set
zsh18 'local x' does not set variable

stdout:
stderr: 
toysh18 'local x' does not set variable

[toysh status] Expected 1, got 0

stdout:
stderr: 
set: bad -o nounset
sush18 'local x' does not set variable

[sush status] Expected 1, got 0

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: nounset: invalid option name
brush18 'local x' does not set variable

[brush status] Expected 1, got 0

stdout:
stderr: 
dash19 'local -a x' does not set variable

stdout:
stderr: 
dash: 3: local: -a: bad variable name
ash19 'local -a x' does not set variable

[ash status] Expected 1, got 2

stdout:
stderr: 
ash: local: line 3: -a: bad variable name
zsh19 'local -a x' does not set variable

stdout:
stderr: 
toysh19 'local -a x' does not set variable

[toysh status] Expected 1, got 0

stdout:
stderr: 
set: bad -o nounset
local: bad -a
sush19 'local -a x' does not set variable

[sush status] Expected 1, got 0

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: nounset: invalid option name
brush19 'local -a x' does not set variable

[brush status] Expected 1, got 0

stdout:
stderr: 
dash20 'local x' and then array assignment

stdout:
stderr: 
dash: 3: x[3]=foo: not found
dash: 4: Bad substitution
ash20 'local x' and then array assignment

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

stdout:
stderr: 
ash: x[3]=foo: not found
ash: syntax error: bad substitution
zsh20 'local x' and then array assignment

stdout:
o
stderr:
toysh20 'local x' and then array assignment

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

stdout:
stderr: 
sh: x[3]=foo: No such file or directory
dash21 'declare -A' and then dict assignment

stdout:
stderr: 
dash: 1: declare: not found
dash: 3: foo[bar]=value: not found
dash: 4: Bad substitution
ash21 'declare -A' and then dict assignment

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

stdout:
stderr: 
ash: declare: not found
ash: foo[bar]=value: not found
ash: syntax error: bad substitution
mksh21 'declare -A' and then dict assignment

stdout:
stderr: 
mksh: <stdin>[1]: declare: not found
mksh: <stdin>[3]: "bar": unexpected '"'
ksh21 'declare -A' and then dict assignment

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

stdout:
stderr: 
E: ksh: <stdin>[1]: declare: inaccessible or not found
W: ksh: <stdin>[3]: "bar": unexpected '"'
toysh21 'declare -A' and then dict assignment

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

stdout:
stderr: 
sh: foo[bar]=value: No such file or directory
toysh22 declare in an if statement

[toysh stdout] Expected 'bar\neggs\n', got 'HI\n\nBAD\neggs\n'

stdout:
HI

BAD
eggs
stderr:
bash24 Reveal existence of "temp frame" (All shells disagree here!!!)

[bash stdout] Expected 'x=temp-binding\nx=mutated-temp\nx=local\nx=global\nx=global\n' Got 'x=temp-binding\nx=mutated-temp\nx=local\nx=\nx=global\n'

stdout:
x=temp-binding
x=mutated-temp
x=local
x=
x=global
stderr:
dash24 Reveal existence of "temp frame" (All shells disagree here!!!)

stdout:
x=temp-binding
x=mutated-temp
x=local
x=
x=global
stderr:
ash24 Reveal existence of "temp frame" (All shells disagree here!!!)

[ash stdout] Expected 'x=temp-binding\nx=mutated-temp\nx=local\nx=mutated-temp\nx=global\n' Got 'x=temp-binding\nx=mutated-temp\nx=local\nx=\nx=global\n'

stdout:
x=temp-binding
x=mutated-temp
x=local
x=
x=global
stderr:
zsh24 Reveal existence of "temp frame" (All shells disagree here!!!)

stdout:
x=temp-binding
x=mutated-temp
x=local
x=
x=global
stderr:
mksh24 Reveal existence of "temp frame" (All shells disagree here!!!)

stdout:
x=temp-binding
x=mutated-temp
x=local
x=mutated-temp
x=mutated-temp
stderr:
ksh24 Reveal existence of "temp frame" (All shells disagree here!!!)

[ksh stdout] Expected 'x=temp-binding\nx=mutated-temp\nx=local\nx=mutated-temp\nx=global\n' Got 'x=temp-binding\nx=mutated-temp\nx=local\nx=global\nx=global\n'

stdout:
x=temp-binding
x=mutated-temp
x=local
x=global
x=global
stderr:
toysh24 Reveal existence of "temp frame" (All shells disagree here!!!)

[toysh stdout] Expected 'x=temp-binding\nx=mutated-temp\nx=local\nx=mutated-temp\nx=global\n' Got 'x=temp-binding\nx=mutated-temp\nx=local\nx=\nx=mutated-temp\n'

stdout:
x=temp-binding
x=mutated-temp
x=local
x=
x=mutated-temp
stderr:
sush24 Reveal existence of "temp frame" (All shells disagree here!!!)

[sush stdout] Expected 'x=temp-binding\nx=mutated-temp\nx=local\nx=mutated-temp\nx=global\n' Got 'x=temp-binding\nx=mutated-temp\nx=local\nx=\nx=\n'

stdout:
x=temp-binding
x=mutated-temp
x=local
x=
x=
stderr:
brush24 Reveal existence of "temp frame" (All shells disagree here!!!)

[brush stdout] Expected 'x=temp-binding\nx=mutated-temp\nx=local\nx=mutated-temp\nx=global\n' Got 'x=temp-binding\nx=mutated-temp\nx=local\nx=\nx=global\n'

stdout:
x=temp-binding
x=mutated-temp
x=local
x=
x=global
stderr:
dash25 Test above without 'local' (which is not POSIX)

stdout:
x=temp-binding
x=mutated-temp
x=
x=global
stderr:
ash25 Test above without 'local' (which is not POSIX)

[ash stdout] Expected 'x=temp-binding\nx=mutated-temp\nx=global\nx=global\n' Got 'x=temp-binding\nx=mutated-temp\nx=\nx=global\n'

stdout:
x=temp-binding
x=mutated-temp
x=
x=global
stderr:
zsh25 Test above without 'local' (which is not POSIX)

stdout:
x=temp-binding
x=mutated-temp
x=
x=global
stderr:
mksh25 Test above without 'local' (which is not POSIX)

stdout:
x=temp-binding
x=mutated-temp
x=
x=
stderr:
toysh25 Test above without 'local' (which is not POSIX)

[toysh stdout] Expected 'x=temp-binding\nx=mutated-temp\nx=global\nx=global\n' Got 'x=temp-binding\nx=mutated-temp\nx=\nx=\n'

stdout:
x=temp-binding
x=mutated-temp
x=
x=
stderr:
sush25 Test above without 'local' (which is not POSIX)

[sush stdout] Expected 'x=temp-binding\nx=mutated-temp\nx=global\nx=global\n' Got 'x=temp-binding\nx=mutated-temp\nx=\nx=\n'

stdout:
x=temp-binding
x=mutated-temp
x=
x=
stderr:
bash26 Using ${x-default} after unsetting local shadowing a global

stdout:
x=global
x=local
- operator = default
:- operator = default
stderr:
dash26 Using ${x-default} after unsetting local shadowing a global

stdout:
x=global
x=local
- operator = default
:- operator = default
stderr:
ash26 Using ${x-default} after unsetting local shadowing a global

[ash stdout] Expected 'x=global\nx=local\n- operator = global\n:- operator = global\n' Got 'x=global\nx=local\n- operator = default\n:- operator = default\n'

stdout:
x=global
x=local
- operator = default
:- operator = default
stderr:
zsh26 Using ${x-default} after unsetting local shadowing a global

stdout:
x=global
x=local
- operator = default
:- operator = default
stderr:
toysh26 Using ${x-default} after unsetting local shadowing a global

[toysh stdout] Expected 'x=global\nx=local\n- operator = global\n:- operator = global\n' Got 'x=global\nx=local\n- operator = default\n:- operator = default\n'

stdout:
x=global
x=local
- operator = default
:- operator = default
stderr:
sush26 Using ${x-default} after unsetting local shadowing a global

[sush stdout] Expected 'x=global\nx=local\n- operator = global\n:- operator = global\n' Got 'x=global\nx=local\n- operator = default\n:- operator = default\n'

stdout:
x=global
x=local
- operator = default
:- operator = default
stderr:
brush26 Using ${x-default} after unsetting local shadowing a global

[brush stdout] Expected 'x=global\nx=local\n- operator = global\n:- operator = global\n' Got 'x=global\nx=local\n- operator = default\n:- operator = default\n'

stdout:
x=global
x=local
- operator = default
:- operator = default
stderr:
bash27 Using ${x-default} after unsetting a temp binding shadowing a global

[bash stdout] Expected 'x=temp-binding\nx=local\n- operator = global\n:- operator = global\n' Got 'x=temp-binding\nx=local\n- operator = default\n:- operator = default\n'

stdout:
x=temp-binding
x=local
- operator = default
:- operator = default
stderr:
dash27 Using ${x-default} after unsetting a temp binding shadowing a global

stdout:
x=temp-binding
x=local
- operator = default
:- operator = default
stderr:
ash27 Using ${x-default} after unsetting a temp binding shadowing a global

[ash stdout] Expected 'x=temp-binding\nx=local\n- operator = temp-binding\n:- operator = temp-binding\n' Got 'x=temp-binding\nx=local\n- operator = default\n:- operator = default\n'

stdout:
x=temp-binding
x=local
- operator = default
:- operator = default
stderr:
zsh27 Using ${x-default} after unsetting a temp binding shadowing a global

stdout:
x=temp-binding
x=local
- operator = default
:- operator = default
stderr:
ksh27 Using ${x-default} after unsetting a temp binding shadowing a global

[ksh stdout] Expected 'x=temp-binding\nx=local\n- operator = temp-binding\n:- operator = temp-binding\n' Got 'x=temp-binding\nx=local\n- operator = global\n:- operator = global\n'

stdout:
x=temp-binding
x=local
- operator = global
:- operator = global
stderr:
toysh27 Using ${x-default} after unsetting a temp binding shadowing a global

[toysh stdout] Expected 'x=temp-binding\nx=local\n- operator = temp-binding\n:- operator = temp-binding\n' Got 'x=temp-binding\nx=local\n- operator = default\n:- operator = default\n'

stdout:
x=temp-binding
x=local
- operator = default
:- operator = default
stderr:
sush27 Using ${x-default} after unsetting a temp binding shadowing a global

[sush stdout] Expected 'x=temp-binding\nx=local\n- operator = temp-binding\n:- operator = temp-binding\n' Got 'x=temp-binding\nx=local\n- operator = default\n:- operator = default\n'

stdout:
x=temp-binding
x=local
- operator = default
:- operator = default
stderr:
brush27 Using ${x-default} after unsetting a temp binding shadowing a global

[brush stdout] Expected 'x=temp-binding\nx=local\n- operator = temp-binding\n:- operator = temp-binding\n' Got 'x=temp-binding\nx=local\n- operator = default\n:- operator = default\n'

stdout:
x=temp-binding
x=local
- operator = default
:- operator = default
stderr:
dash28 static assignment doesn't split

stdout:
['a', 'a b c', 'a']
stderr:
toysh28 static assignment doesn't split

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

stdout:
['a', 'a b c', '']
stderr:
sh: readonly: No such file or directory
dash29 aliased assignment doesn't split

stdout:
['a', 'a']
stderr:
dash: 1: shopt: not found
toysh29 aliased assignment doesn't split

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

stdout:
['', '']
stderr:
sh: shopt: No such file or directory
sh: alias: No such file or directory
sh: alias: No such file or directory
sh: e: No such file or directory
sh: r: No such file or directory
sush29 aliased assignment doesn't split

[sush stdout] Expected "['a b c', 'a b c']\n", got 'declare -ar BASH_VERSINFO=([0]="1" [1]="1" [2]="8" [3]="rusty_bash" [4]="release" [5]="x86_64-unknown-linux")\ndeclare -r UID=1000\n[\'\', \'\']\n'

stdout:
declare -ar BASH_VERSINFO=([0]="1" [1]="1" [2]="8" [3]="rusty_bash" [4]="release" [5]="x86_64-unknown-linux")
declare -r UID=1000
['', '']
stderr:
bash30 assignment using dynamic keyword (splits in most shells, not in zsh/osh)

stdout:
['a', 'a']
stderr:
dash30 assignment using dynamic keyword (splits in most shells, not in zsh/osh)

stdout:
['a', 'a']
stderr:
mksh30 assignment using dynamic keyword (splits in most shells, not in zsh/osh)

stdout:
['a', 'a']
stderr:
ksh30 assignment using dynamic keyword (splits in most shells, not in zsh/osh)

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

stdout:
['a', 'a']
stderr:
toysh30 assignment using dynamic keyword (splits in most shells, not in zsh/osh)

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

stdout:
['a', '']
stderr:
sh: readonly: No such file or directory
sush30 assignment using dynamic keyword (splits in most shells, not in zsh/osh)

[sush stdout] Expected "['a b c', 'a b c']\n", got 'declare -ar BASH_VERSINFO=([0]="1" [1]="1" [2]="8" [3]="rusty_bash" [4]="release" [5]="x86_64-unknown-linux")\ndeclare -r UID=1000\n[\'\', \'\']\n'

stdout:
declare -ar BASH_VERSINFO=([0]="1" [1]="1" [2]="8" [3]="rusty_bash" [4]="release" [5]="x86_64-unknown-linux")
declare -r UID=1000
['', '']
stderr:
bash31 assignment using dynamic var names doesn't split

stdout:
['a', 'a']
['a b c', 'a b c']
stderr:
dash31 assignment using dynamic var names doesn't split

stdout:
['a', 'a']
['a b c', 'a b c']
stderr:
ash31 assignment using dynamic var names doesn't split

[ash stdout] Expected "['a b c', 'a b c']\n['a b c', 'a b c']\n", got "['a', 'a']\n['a b c', 'a b c']\n"

stdout:
['a', 'a']
['a b c', 'a b c']
stderr:
mksh31 assignment using dynamic var names doesn't split

stdout:
['a', 'a']
['a b c', 'a b c']
stderr:
ksh31 assignment using dynamic var names doesn't split

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

stdout:
['a', 'a']
['a b c', 'a b c']
stderr:
toysh31 assignment using dynamic var names doesn't split

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

stdout:
['a', '']
['a b c', '']
stderr:
sh: readonly: No such file or directory
sh: readonly: No such file or directory
sush31 assignment using dynamic var names doesn't split

[sush stdout] Expected "['a b c', 'a b c']\n['a b c', 'a b c']\n", got 'declare -ar BASH_VERSINFO=([0]="1" [1]="1" [2]="8" [3]="rusty_bash" [4]="release" [5]="x86_64-unknown-linux")\ndeclare -r UID=1000\n[\'\', \'\']\ndeclare -ar BASH_VERSINFO=([0]="1" [1]="1" [2]="8" [3]="rusty_bash" [4]="release" [5]="x86_64-unknown-linux")\ndeclare -r UID=1000\n[\'\', \'\']\n'

stdout:
declare -ar BASH_VERSINFO=([0]="1" [1]="1" [2]="8" [3]="rusty_bash" [4]="release" [5]="x86_64-unknown-linux")
declare -r UID=1000
['', '']
declare -ar BASH_VERSINFO=([0]="1" [1]="1" [2]="8" [3]="rusty_bash" [4]="release" [5]="x86_64-unknown-linux")
declare -r UID=1000
['', '']
stderr:
brush31 assignment using dynamic var names doesn't split

[brush stdout] Expected "['a b c', 'a b c']\n['a b c', 'a b c']\n", got "['', '']\n['', '']\n"

stdout:
['', '']
['', '']
stderr:
dash32 assign and glob

stdout:
['*']
['b']
stderr:
toysh32 assign and glob

[toysh stdout] Expected "['*']\n['*']\n", got "['foo=a', 'foo=b']\n['b']\n"

stdout:
['foo=a', 'foo=b']
['b']
stderr:
sush32 assign and glob

[sush stdout] Expected "['*']\n['*']\n", got "['foo=a foo=b']\n['foo=a foo=b']\n"

stdout:
['foo=a foo=b']
['foo=a foo=b']
stderr:
dash33 declare and glob

stdout:
['']
stderr:
dash: 3: typeset: not found
ash33 declare and glob

[ash stdout] Expected "['*']\n", got "['']\n"

stdout:
['']
stderr:
ash: typeset: not found
toysh33 declare and glob

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

stdout:
['']
stderr:
sh: typeset: No such file or directory
sush33 declare and glob

[sush stdout] Expected "['*']\n", got "['foo=a foo=b']\n"

stdout:
['foo=a foo=b']
stderr:
bash34 readonly $x where x='b c'

stdout:
status=1
status=1
status=1
stderr:
bash: line 4: a: readonly variable
bash: line 6: b: readonly variable
bash: line 8: c: readonly variable
dash34 readonly $x where x='b c'

stdout:
stderr: 
dash: 4: a: is read only
ash34 readonly $x where x='b c'

[ash status] Expected 1, got 2

stdout:
stderr: 
ash: a: is read only
mksh34 readonly $x where x='b c'

stdout:
stderr: 
mksh: <stdin>[4]: read-only: a
ksh34 readonly $x where x='b c'

[ksh status] Expected 1, got 2

stdout:
stderr: 
E: ksh: <stdin>[4]: read-only: a
toysh34 readonly $x where x='b c'

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

stdout:
status=0
status=0
status=0
stderr:
sh: readonly: No such file or directory
sush34 readonly $x where x='b c'

[sush stdout] Expected u'', got 'declare -ar BASH_VERSINFO=([0]="1" [1]="1" [2]="8" [3]="rusty_bash" [4]="release" [5]="x86_64-unknown-linux")\ndeclare -r UID=1000\nstatus=0\nstatus=0\nstatus=0\n'
[sush status] Expected 1, got 0

stdout:
declare -ar BASH_VERSINFO=([0]="1" [1]="1" [2]="8" [3]="rusty_bash" [4]="release" [5]="x86_64-unknown-linux")
declare -r UID=1000
status=0
status=0
status=0
stderr:
brush34 readonly $x where x='b c'

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

stdout:
status=1
status=1
status=1
stderr:
ERROR error: cannot mutate readonly variable
ERROR error: cannot mutate readonly variable
ERROR error: cannot mutate readonly variable
dash35 readonly a=(1 2) no_value c=(3 4) makes 'no_value' readonly

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash35 readonly a=(1 2) no_value c=(3 4) makes 'no_value' readonly

[ash status] Expected 1, got 2

stdout:
stderr: 
ash: syntax error: unexpected "("
toysh35 readonly a=(1 2) no_value c=(3 4) makes 'no_value' readonly

[toysh status] Expected 1, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: )
dash37 local a=loc $var c=loc

stdout:
global
['loc', 'global', 'loc']
stderr:
sush37 local a=loc $var c=loc

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

stdout:
global
['loc', 'global', 'loc']
stderr:
zsh38 redirect after assignment builtin (what's going on with dash/bash/mksh here?)

stdout:
done
stderr:
sush38 redirect after assignment builtin (what's going on with dash/bash/mksh here?)

[sush stderr] Expected 'STDERR\n', got ''

stdout:
done
stderr:
osh38 redirect after assignment builtin (what's going on with dash/bash/mksh here?)

[osh stderr] Expected 'STDERR\n', got ''

stdout:
done
stderr:
osh39 redirect after command sub (like case above but without assignment builtin)

[osh stderr] Expected 'STDERR\n', got ''

stdout:
stdout=STDOUT
stderr:
bash40 redirect after bare assignment

stdout:
done
stderr:
STDERR
sush40 redirect after bare assignment

[sush stderr] Expected u'', got 'STDERR\n'

stdout:
done
stderr:
STDERR
bash41 redirect after declare -p

stdout:
stderr: 
declare -- foo="bar"
dash41 redirect after declare -p

stdout:
stderr: 
ash41 redirect after declare -p

[ash stderr] Expected 'typeset foo=bar\n', got 'ash: typeset: not found\n'
[ash status] Expected 0, got 127

stdout:
stderr: 
ash: typeset: not found
toysh41 redirect after declare -p

[toysh stderr] Expected 'typeset foo=bar\n', got 'munmap_chunk(): invalid pointer\n'
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush41 redirect after declare -p

[sush stderr] Expected 'typeset foo=bar\n', got 'declare -- foo=bar\n'

stdout:
stderr: 
declare -- foo=bar
brush41 redirect after declare -p

[brush stderr] Expected 'typeset foo=bar\n', got 'declare -- foo="bar"\n'

stdout:
stderr: 
declare -- foo="bar"
osh41 redirect after declare -p

stdout:
stderr: 
declare -- foo=bar
dash42 declare -a arr does not remove existing arrays (OSH regression)

stdout:
stderr: 
ash42 declare -a arr does not remove existing arrays (OSH regression)

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

stdout:
stderr: 
ash: declare: not found
ash: syntax error: unexpected "("
toysh42 declare -a arr does not remove existing arrays (OSH regression)

[toysh stdout] Expected 'arr:3\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
dash43 declare -A dict does not remove existing arrays (OSH regression)

stdout:
stderr: 
ash43 declare -A dict does not remove existing arrays (OSH regression)

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

stdout:
stderr: 
ash: declare: not found
ash: dict[foo]=hello: not found
ash: dict[bar]=oil: not found
ash: dict[baz]=world: not found
ash: declare: not found
ash: syntax error: bad substitution
mksh43 declare -A dict does not remove existing arrays (OSH regression)

stdout:
stderr: 
ksh43 declare -A dict does not remove existing arrays (OSH regression)

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

stdout:
stderr: 
E: ksh: <stdin>[3]: declare: inaccessible or not found
W: ksh: <stdin>[4]: 'foo': multi-character character constant
toysh43 declare -A dict does not remove existing arrays (OSH regression)

[toysh stdout] Expected 'dict:3\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush43 declare -A dict does not remove existing arrays (OSH regression)

[sush stdout] Expected 'dict:3\n', got 'dict:0\n'

stdout:
dict:0
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: 'foo': syntax error: operand expected (error token is "'foo'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: 'bar': syntax error: operand expected (error token is "'bar'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: 'baz': syntax error: operand expected (error token is "'baz'")
dash44 "readonly -a arr" and "readonly -A dict" should not not remove existing arrays

stdout:
stderr: 
ash44 "readonly -a arr" and "readonly -A dict" should not not remove existing arrays

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

stdout:
stderr: 
ash: declare: not found
ash: syntax error: unexpected "("
mksh44 "readonly -a arr" and "readonly -A dict" should not not remove existing arrays

stdout:
stderr: 
ksh44 "readonly -a arr" and "readonly -A dict" should not not remove existing arrays

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

stdout:
stderr: 
E: ksh: <stdin>[3]: declare: inaccessible or not found
E: ksh: <stdin>[5]: declare: inaccessible or not found
W: ksh: <stdin>[6]: 'foo': multi-character character constant
toysh44 "readonly -a arr" and "readonly -A dict" should not not remove existing arrays

[toysh stdout] Expected 'arr:3\ndict:3\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush44 "readonly -a arr" and "readonly -A dict" should not not remove existing arrays

[sush stdout] Expected 'arr:3\ndict:3\n', got 'arr:3\ndict:0\n'

stdout:
arr:3
dict:0
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: 'foo': syntax error: operand expected (error token is "'foo'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: 'bar': syntax error: operand expected (error token is "'bar'")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 8: 'baz': syntax error: operand expected (error token is "'baz'")
bash45 "declare -a arr" and "readonly -a a" creates an empty array (OSH)

stdout:
declare -a arr1
declare -r arr2
declare -A dict1
declare -r dict2
stderr:
dash45 "declare -a arr" and "readonly -a a" creates an empty array (OSH)

stdout:
stderr: 
ash45 "declare -a arr" and "readonly -a a" creates an empty array (OSH)

[ash stdout] Expected 'declare -a arr1=()\ndeclare -ra arr2=()\ndeclare -A dict1=()\ndeclare -rA dict2=()\n' Got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: declare: not found
ash: readonly: line 4: illegal option -a
zsh45 "declare -a arr" and "readonly -a a" creates an empty array (OSH)

stdout:
typeset -a arr1
arr1=(  )
typeset -a arr2
arr2=(  )
typeset -ar arr2
typeset -A dict1
dict1=( )
typeset -a dict2
dict2=( )
typeset -Ar dict2
stderr:
mksh45 "declare -a arr" and "readonly -a a" creates an empty array (OSH)

stdout:
stderr: 
ksh45 "declare -a arr" and "readonly -a a" creates an empty array (OSH)

[ksh stdout] Expected 'declare -a arr1=()\ndeclare -ra arr2=()\ndeclare -A dict1=()\ndeclare -rA dict2=()\n' Got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[3]: declare: inaccessible or not found
E: ksh: <stdin>[4]: readonly: -a: unknown option
toysh45 "declare -a arr" and "readonly -a a" creates an empty array (OSH)

[toysh stdout] Expected 'declare -a arr1=()\ndeclare -ra arr2=()\ndeclare -A dict1=()\ndeclare -rA dict2=()\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush45 "declare -a arr" and "readonly -a a" creates an empty array (OSH)

[sush stdout] Expected 'declare -a arr1=()\ndeclare -ra arr2=()\ndeclare -A dict1=()\ndeclare -rA dict2=()\n' Got 'declare -a arr1\ndeclare -ar arr2\ndeclare -A dict1\ndeclare -Ar dict2\n'

stdout:
declare -a arr1
declare -ar arr2
declare -A dict1
declare -Ar dict2
stderr:
brush45 "declare -a arr" and "readonly -a a" creates an empty array (OSH)

[brush stdout] Expected 'declare -a arr1=()\ndeclare -ra arr2=()\ndeclare -A dict1=()\ndeclare -rA dict2=()\n' Got 'declare -a arr1\ndeclare -ar arr2\ndeclare -A dict1\ndeclare -Ar dict2\n'

stdout:
declare -a arr1
declare -ar arr2
declare -A dict1
declare -Ar dict2
stderr:
dash46 readonly array should not be modified by a+=(1)

stdout:
stderr: 
ash46 readonly array should not be modified by a+=(1)

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

stdout:
stderr: 
ash: syntax error: unexpected "("
mksh46 readonly array should not be modified by a+=(1)

stdout:
stderr: 
mksh: <stdin>[4]: readonly: -a: unknown option
ksh46 readonly array should not be modified by a+=(1)

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

stdout:
stderr: 
E: ksh: <stdin>[4]: readonly: -a: unknown option
toysh46 readonly array should not be modified by a+=(1)

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

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush46 readonly array should not be modified by a+=(1)

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

stdout:
[]
[]
stderr: