Results for assign.test.sh

statusdashbashmkshzshosh
pass 2332303539
ok 75631
N-I 40100
BUG 85540
FAIL 00002
total4242424242
casedashbashmkshzshoshdescription
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 func
7BUG pass ok pass pass Multiple temporary envs on the stack
detailsdetails
8pass pass pass pass pass Escaped = in command name
9BUG pass ok ok pass Env binding not allowed before compound command
detailsdetailsdetails
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
24BUG BUG BUG pass pass Reveal existence of "temp frame" (All shells disagree here!!!)
detailsdetailsdetails
25BUG BUG BUG pass pass Test above without 'local' (which is not POSIX)
detailsdetailsdetails
26pass pass BUG pass pass Using ${x-default} after unsetting local shadowing a global
details
27pass BUG BUG pass pass Using ${x-default} after unsetting a temp binding shadowing a global
detailsdetails
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
159 passed, 22 OK, 5 not implemented, 22 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:
dash9 Env binding not allowed before compound command

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 1: for: not found
mksh9 Env binding not allowed before compound command

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/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'
bash14 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:
bash16 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: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/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: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/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: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 3: x[3]=foo: not found
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 4: Bad substitution
zsh20 'local x' and then array assignment

stdout:
o
stderr:
dash21 'declare -A' and then dict assignment

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 1: declare: not found
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 3: foo[bar]=value: not found
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 4: Bad substitution
mksh21 'declare -A' and then dict assignment

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[1]: declare: not found
/home/andy/git/oilshell/oil/_tmp/spec-bin/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=mutated-temp
stderr:
bash24 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:
dash25 Test above without 'local' (which is not POSIX)

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

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

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

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

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

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

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

stdout:
['a', 'a']
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 1: shopt: not found
dash30 assignment using dynamic keyword (splits in most shells, not in zsh/osh)

stdout:
['a', 'a']
stderr:
bash30 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:
bash31 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:
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 3: typeset: not found
dash34 readonly $x where x='b c'

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 4: a: is read only
bash34 readonly $x where x='b c'

stdout:
status=1
status=1
status=1
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 4: a: readonly variable
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 6: b: readonly variable
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 8: c: readonly variable
mksh34 readonly $x where x='b c'

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[4]: read-only: a
dash35 readonly a=(1 2) no_value c=(3 4) makes 'no_value' readonly

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/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:
bash40 redirect after bare assignment

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

stdout:
stderr: 
bash41 redirect after declare -p

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

stdout:
stderr: 
foo