assign () { run-file assign "$@" } run-file () { local spec_name=$1; shift; sh-spec spec/$spec_name.test.sh --compare-shells --oils-bin-dir $PWD/bin "$@" } assign: spec test case results

Results for assign.test.sh

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

Details on runs that didn't PASS

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

stdout:
foo
[][]
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:
mksh9 Env binding not allowed before compound command

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

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

stdout:
stderr: 
zsh: parse error near `for'
bash-414 Env binding in readonly/declare is NOT exported! (pitfall)

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

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

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

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:
dash18 'local x' does not set variable

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

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

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

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

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

stdout:
o
stderr:
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
mksh21 'declare -A' and then dict assignment

stdout:
stderr: 
mksh: <stdin>[1]: declare: not found
mksh: <stdin>[3]: "bar": unexpected '"'
dash24 Reveal existence of "temp frame" (All shells disagree here!!!)

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

stdout:
x=temp-binding
x=mutated-temp
x=local
x=global
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:
zsh24 Reveal existence of "temp frame" (All shells disagree here!!!)

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:
mksh25 Test above without 'local' (which is not POSIX)

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

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

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

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:
dash27 Using ${x-default} after unsetting a temp binding shadowing a global

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

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

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

stdout:
['a', 'a b c', 'a']
stderr:
dash29 aliased assignment doesn't split

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

stdout:
['a', 'a']
stderr:
bash-430 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:
dash31 assignment using dynamic var names doesn't split

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

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:
dash32 assign and glob

stdout:
['*']
['b']
stderr:
dash33 declare and glob

stdout:
['']
stderr:
dash: 3: typeset: not found
dash34 readonly $x where x='b c'

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

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

stdout:
stderr: 
mksh: <stdin>[4]: read-only: a
dash35 readonly a=(1 2) no_value c=(3 4) makes 'no_value' readonly

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
dash37 local a=loc $var c=loc

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

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:
bash-440 redirect after bare assignment

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

stdout:
stderr: 
bash-441 redirect after declare -p

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: 
dash43 declare -A dict does not remove existing arrays (OSH regression)

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

stdout:
stderr: