Results for assign.test.sh

casedashbashmkshzshoshosh_ALTdescription
0pass pass pass pass pass pass Env value doesn't persist
1pass pass pass pass pass pass Env value with equals
2pass pass BUG pass pass pass Env binding can use preceding bindings, but not subsequent ones
details
3pass pass pass pass pass pass Env value with two quotes
4pass pass pass pass pass pass Env value with escaped <
5pass pass pass pass pass pass FOO=foo echo [foo]
6pass pass pass pass pass pass FOO=foo func
7BUG pass ok pass pass pass Multiple temporary envs on the stack
detailsdetails
8pass pass pass pass pass pass Escaped = in command name
9BUG pass ok ok pass pass Env binding not allowed before compound command
detailsdetailsdetails
10pass pass pass ok pass pass Trying to run keyword 'for'
details
11pass pass pass pass pass pass Empty env binding
12pass pass pass pass pass pass Assignment doesn't do word splitting
13pass pass pass pass pass pass Assignment doesn't do glob expansion
14ok ok ok ok pass pass Env binding in readonly/declare disallowed
detailsdetailsdetailsdetails
15pass pass pass ok pass pass assignments / array assignments not interpreted after 'echo'
details
16pass pass pass ok FAIL FAIL dynamic local variables
detailsdetailsdetails
17ok pass pass BUG pass pass 'local x' does not set variable
detailsdetails
18ok pass pass BUG pass pass 'local -a x' does not set variable
detailsdetails
19N-I pass pass BUG pass pass 'local x' and then array assignment
detailsdetails
20N-I pass N-I pass pass pass 'declare -A' and then dict assignment
detailsdetails
21pass pass pass pass pass pass declare in an if statement
22pass pass pass pass pass pass Modify a temporary binding
23BUG BUG BUG pass pass pass Reveal existence of "temp frame" (All shells disagree here!!!)
detailsdetailsdetails
24BUG BUG BUG pass pass pass Test above without 'local' (which is not POSIX)
detailsdetailsdetails
25pass pass BUG pass pass pass Using ${x-default} after unsetting local shadowing a global
details
26pass BUG BUG pass pass pass Using ${x-default} after unsetting a temp binding shadowing a global
detailsdetails
27BUG pass pass pass FAIL FAIL static assignment doesn't split
detailsdetailsdetails
28BUG pass pass pass FAIL FAIL aliased assignment doesn't split
detailsdetailsdetails
29pass pass pass BUG FAIL FAIL assignment using dynamic keyword splits
detailsdetailsdetails
30pass pass pass BUG FAIL FAIL assignment using dynamic var names doesn't split
detailsdetailsdetails
31BUG pass pass pass FAIL FAIL assign and glob
detailsdetailsdetails
32N-I pass pass pass pass pass declare and glob
details
33pass ok pass ok pass pass readonly $x where x='b c' makes them readonly (but NOT defined)
detailsdetails
34ok pass pass pass pass pass readonly a=(1 2) no_value c=(3 4) makes 'no_value' readonly
details
35pass pass pass pass pass pass export a=1 no_value c=2
36BUG pass pass ok FAIL FAIL local a=loc $vars d=loc (splitting in local)
detailsdetailsdetailsdetails

167 passed, 16 ok, 4 known unimplemented, 21 known bugs, 7 failed, 0 skipped

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: 
_tmp/spec-bin/dash: 1: for: not found
mksh9 Env binding not allowed before compound command

stdout:
stderr: 
_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'
dash14 Env binding in readonly/declare disallowed

stdout:
v=None
stderr:
bash14 Env binding in readonly/declare disallowed

stdout:
v=None
stderr:
mksh14 Env binding in readonly/declare disallowed

stdout:
v=None
stderr:
zsh14 Env binding in readonly/declare disallowed

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

stdout:
stderr: 
zsh: no matches found: b[0]=2
zsh16 dynamic local variables

stdout:
-y a=b-
--
-y a=b-
--
stderr:
osh16 dynamic local variables

[osh stdout] Expected '-y a=b-\n--\n-y-\n-b-\n', got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
    local "$1"  # Only x is assigned here
          ^
[ stdin ]:2: Variable names must be unquoted constants
osh_ALT16 dynamic local variables

[osh_ALT stdout] Expected '-y a=b-\n--\n-y-\n-b-\n', got ''
[osh_ALT status] Expected 0, got 2

stdout:
stderr: 
    local "$1"  # Only x is assigned here
          ^
[ stdin ]:2: Variable names must be unquoted constants
dash17 'local x' does not set variable

stdout:
stderr: 
_tmp/spec-bin/dash: 4: x: parameter not set
zsh17 'local x' does not set variable

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

stdout:
stderr: 
_tmp/spec-bin/dash: 3: local: -a: bad variable name
zsh18 'local -a x' does not set variable

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

stdout:
stderr: 
_tmp/spec-bin/dash: 3: x[3]=foo: not found
_tmp/spec-bin/dash: 4: Bad substitution
zsh19 'local x' and then array assignment

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

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

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

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

stdout:
x=temp-binding
x=mutated-temp
x=local
x=global
x=global
stderr:
mksh23 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:
dash24 Test above without 'local' (which is not POSIX)

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

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

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

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

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

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

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

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

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

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

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

stdout:
['a', 'a']
stderr:
_tmp/spec-bin/dash: 1: shopt: not found
osh28 aliased assignment doesn't split

[osh stdout] Expected "['a b c', 'a b c']\n", got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
  readonly ro=$words
                     ^
[ expansion of alias 'r' ]:1: Invalid variable name ''
osh_ALT28 aliased assignment doesn't split

[osh_ALT stdout] Expected "['a b c', 'a b c']\n", got ''
[osh_ALT status] Expected 0, got 2

stdout:
stderr: 
  readonly ro=$words
                     ^
[ expansion of alias 'r' ]:1: Invalid variable name ''
zsh29 assignment using dynamic keyword splits

stdout:
['a b c', 'a b c']
stderr:
osh29 assignment using dynamic keyword splits

[osh stdout] Expected "['a', 'a']\n", got "['a', '']\n"

stdout:
['a', '']
stderr:
  $r ro=$words
  ^~
[ stdin ]:5: 'readonly' not found
osh_ALT29 assignment using dynamic keyword splits

[osh_ALT stdout] Expected "['a', 'a']\n", got "['a', '']\n"

stdout:
['a', '']
stderr:
  $r ro=$words
  ^~
[ stdin ]:5: 'readonly' not found
zsh30 assignment using dynamic var names doesn't split

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

[osh stdout] Expected "['a', 'a']\n['a b c', 'a b c']\n", got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
  readonly $arg_ro
           ^~~~~~~
[ stdin ]:5: Variable names must be unquoted constants
osh_ALT30 assignment using dynamic var names doesn't split

[osh_ALT stdout] Expected "['a', 'a']\n['a b c', 'a b c']\n", got ''
[osh_ALT status] Expected 0, got 2

stdout:
stderr: 
  readonly $arg_ro
           ^~~~~~~
[ stdin ]:5: Variable names must be unquoted constants
dash31 assign and glob

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

[osh stdout] Expected "['*']\n['*']\n", got "['*']\n['b']\n"

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

[osh_ALT stdout] Expected "['*']\n['*']\n", got "['*']\n['b']\n"

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

stdout:
['']
stderr:
_tmp/spec-bin/dash: 3: typeset: not found
bash33 readonly $x where x='b c' makes them readonly (but NOT defined)

stdout:
status=1
status=1
status=1
stderr:
_tmp/spec-bin/bash: line 4: a: readonly variable
_tmp/spec-bin/bash: line 6: b: readonly variable
_tmp/spec-bin/bash: line 8: c: readonly variable
zsh33 readonly $x where x='b c' makes them readonly (but NOT defined)

stdout:
stderr: 
readonly: not valid in this context: b c
dash34 readonly a=(1 2) no_value c=(3 4) makes 'no_value' readonly

stdout:
stderr: 
_tmp/spec-bin/dash: 1: Syntax error: "(" unexpected
dash36 local a=loc $vars d=loc (splitting in local)

stdout:
global global
['loc', 'global', 'global', 'loc']
stderr:
zsh36 local a=loc $vars d=loc (splitting in local)

stdout:
global global
stderr:
f:local:1: not valid in this context: b c
osh36 local a=loc $vars d=loc (splitting in local)

[osh stdout] Expected "global global\n['loc', '', '', 'loc']\n", got 'global global\n'
[osh status] Expected 0, got 2

stdout:
global global
stderr:
    local a=loc $vars d=loc
                ^~~~~
[ stdin ]:6: Variable names must be unquoted constants
osh_ALT36 local a=loc $vars d=loc (splitting in local)

[osh_ALT stdout] Expected "global global\n['loc', '', '', 'loc']\n", got 'global global\n'
[osh_ALT status] Expected 0, got 2

stdout:
global global
stderr:
    local a=loc $vars d=loc
                ^~~~~
[ stdin ]:6: Variable names must be unquoted constants