Results for assign.test.sh

casedashbashmkshoshosh_ALTosh-byterundescription
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 pass pass pass Env binding not allowed before compound command
detailsdetails
10pass pass pass pass pass pass Trying to run keyword 'for'
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 pass pass pass Env binding in readonly/declare disallowed
detailsdetailsdetails
15N-I pass N-I pass pass pass local -a
detailsdetails
16N-I pass N-I pass pass pass declare -a
detailsdetails
17N-I pass pass pass pass pass typeset -a a[1]=a a[3]=c
details
18N-I pass pass FAIL FAIL FAIL indexed LHS without spaces is allowed
detailsdetailsdetailsdetails
19N-I pass N-I pass pass pass declare -f exit code indicates function existence
detailsdetails
20N-I pass N-I pass pass pass declare -F prints function names
detailsdetails
21N-I pass N-I pass pass pass declare -p
detailsdetails
22N-I pass pass pass pass pass typeset -f
details
23N-I pass BUG pass pass pass typeset -p
detailsdetails
24N-I ok ok pass pass pass typeset -r makes a string readonly
detailsdetailsdetails
25N-I ok N-I pass pass pass typeset -ar makes it readonly
detailsdetailsdetails
26N-I pass pass pass pass pass typeset -x makes it exported
details
27N-I pass pass pass pass pass Multiple assignments / array assignments on a line
details
28pass pass pass pass pass pass assignments / array assignments not interpreted after 'echo'
29N-I ok ok pass pass pass Env bindings shouldn't contain array assignments
detailsdetailsdetails
30N-I BUG ok pass pass pass syntax error in array assignment
detailsdetailsdetails
31pass pass pass FAIL FAIL FAIL dynamic local variables
detailsdetailsdetails
32ok pass pass pass pass pass 'local x' does not set variable
details
33ok pass pass pass pass pass 'local -a x' does not set variable
details
34N-I pass pass pass pass pass 'local x' and then array assignment
details
35N-I pass N-I pass pass pass 'declare -A' and then dict assignment
detailsdetails
36N-I pass N-I pass pass pass declare -g (bash-specific; bash-completion uses it)
detailsdetails
37pass pass pass pass pass pass declare in an if statement

178 passed, 13 ok, 26 known unimplemented, 5 known bugs, 2 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
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:
dash15 local -a

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Syntax error: "(" unexpected (expecting "}")
mksh15 local -a

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[2]: syntax error: '(' unexpected
dash16 declare -a

stdout:
stderr: 
_tmp/spec-bin/dash: 1: Syntax error: "(" unexpected
mksh16 declare -a

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[1]: syntax error: '(' unexpected
dash17 typeset -a a[1]=a a[3]=c

stdout:
stderr: 
_tmp/spec-bin/dash: 1: typeset: not found
_tmp/spec-bin/dash: 2: Bad substitution
dash18 indexed LHS without spaces is allowed

stdout:
stderr: 
_tmp/spec-bin/dash: 1: a[1: not found
_tmp/spec-bin/dash: 2: Bad substitution
osh18 indexed LHS without spaces is allowed

[osh stdout] Expected "['x', 'z']\n", got '[]\n'

stdout:
[]
stderr:
osh error: 'a[1': No such file or directory
osh_ALT18 indexed LHS without spaces is allowed

[osh_ALT stdout] Expected "['x', 'z']\n", got '[]\n'

stdout:
[]
stderr:
osh error: 'a[1': No such file or directory
osh-byterun18 indexed LHS without spaces is allowed

[osh-byterun stdout] Expected "['x', 'z']\n", got '[]\n'

stdout:
[]
stderr:
osh error: 'a[1': No such file or directory
dash19 declare -f exit code indicates function existence

stdout:
127
127
127
stderr:
_tmp/spec-bin/dash: 2: declare: not found
_tmp/spec-bin/dash: 5: declare: not found
_tmp/spec-bin/dash: 8: declare: not found
mksh19 declare -f exit code indicates function existence

stdout:
127
127
127
stderr:
_tmp/spec-bin/mksh: <stdin>[2]: declare: not found
_tmp/spec-bin/mksh: <stdin>[5]: declare: not found
_tmp/spec-bin/mksh: <stdin>[8]: declare: not found
dash20 declare -F prints function names

stdout:
stderr: 
_tmp/spec-bin/dash: 6: declare: not found
mksh20 declare -F prints function names

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[6]: declare: not found
dash21 declare -p

stdout:
127
127
127
stderr:
_tmp/spec-bin/dash: 2: declare: not found
_tmp/spec-bin/dash: 5: declare: not found
_tmp/spec-bin/dash: 8: declare: not found
mksh21 declare -p

stdout:
127
127
127
stderr:
_tmp/spec-bin/mksh: <stdin>[2]: declare: not found
_tmp/spec-bin/mksh: <stdin>[5]: declare: not found
_tmp/spec-bin/mksh: <stdin>[8]: declare: not found
dash22 typeset -f

stdout:
127
127
127
stderr:
_tmp/spec-bin/dash: 1: typeset: not found
_tmp/spec-bin/dash: 4: typeset: not found
_tmp/spec-bin/dash: 7: typeset: not found
dash23 typeset -p

stdout:
127
127
127
stderr:
_tmp/spec-bin/dash: 2: typeset: not found
_tmp/spec-bin/dash: 5: typeset: not found
_tmp/spec-bin/dash: 8: typeset: not found
mksh23 typeset -p

stdout:
0
0
0
stderr:
dash24 typeset -r makes a string readonly

stdout:
status=0
status=0
status=127
status=127
status=0
status=0
stderr:
_tmp/spec-bin/dash: 1: typeset: not found
_tmp/spec-bin/dash: 2: typeset: not found
_tmp/spec-bin/dash: 7: s1+=e: not found
_tmp/spec-bin/dash: 9: s2+=f: not found
bash24 typeset -r makes a string readonly

stdout:
status=1
status=1
status=1
status=1
status=1
status=1
stderr:
_tmp/spec-bin/bash: line 3: s1: readonly variable
_tmp/spec-bin/bash: line 5: s2: readonly variable
_tmp/spec-bin/bash: line 7: s1: readonly variable
_tmp/spec-bin/bash: line 9: s2: readonly variable
_tmp/spec-bin/bash: line 11: unset: s1: cannot unset: readonly variable
_tmp/spec-bin/bash: line 13: unset: s2: cannot unset: readonly variable
mksh24 typeset -r makes a string readonly

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[3]: read-only: s1
dash25 typeset -ar makes it readonly

stdout:
stderr: 
_tmp/spec-bin/dash: 1: Syntax error: "(" unexpected
bash25 typeset -ar makes it readonly

stdout:
status=1
status=1
status=1
status=1
status=1
status=1
stderr:
_tmp/spec-bin/bash: line 3: array1: readonly variable
_tmp/spec-bin/bash: line 5: array2: readonly variable
_tmp/spec-bin/bash: line 7: array1: readonly variable
_tmp/spec-bin/bash: line 9: array2: readonly variable
_tmp/spec-bin/bash: line 11: unset: array1: cannot unset: readonly variable
_tmp/spec-bin/bash: line 13: unset: array2: cannot unset: readonly variable
mksh25 typeset -ar makes it readonly

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[1]: syntax error: '(' unexpected
dash26 typeset -x makes it exported

stdout:
None
stderr:
_tmp/spec-bin/dash: 1: typeset: not found
dash27 Multiple assignments / array assignments on a line

stdout:
stderr: 
_tmp/spec-bin/dash: 1: b[0+0]=2: not found
dash29 Env bindings shouldn't contain array assignments

stdout:
stderr: 
_tmp/spec-bin/dash: 1: b[0]=2: not found
bash29 Env bindings shouldn't contain array assignments

stdout:
1
None
3
stderr:
mksh29 Env bindings shouldn't contain array assignments

stdout:
1
2
3
stderr:
dash30 syntax error in array assignment

stdout:
stderr: 
_tmp/spec-bin/dash: 1: b[0+]=y: not found
bash30 syntax error in array assignment

stdout:
x
stderr:
_tmp/spec-bin/bash: line 1: 0+: syntax error: operand expected (error token is "+")
mksh30 syntax error in array assignment

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[1]: 0+: unexpected 'end of expression'
osh31 dynamic local variables

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

stdout:
stderr: 
Line 2 of '<stdin>'
    local "$1"  # Only x is assigned here
          ^
Variable names must be unquoted constants
osh_ALT31 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: 
Line 2 of '<stdin>'
    local "$1"  # Only x is assigned here
          ^
Variable names must be unquoted constants
osh-byterun31 dynamic local variables

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

stdout:
stderr: 
Line 2 of '<stdin>'
    local "$1"  # Only x is assigned here
          ^
Variable names must be unquoted constants
dash32 'local x' does not set variable

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

stdout:
stderr: 
_tmp/spec-bin/dash: 3: local: -a: bad variable name
dash34 '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
dash35 '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
mksh35 '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 '"'
dash36 declare -g (bash-specific; bash-completion uses it)

stdout:
['', '']
stderr:
_tmp/spec-bin/dash: 2: declare: not found
_tmp/spec-bin/dash: 3: declare: not found
_tmp/spec-bin/dash: 4: declare: not found
_tmp/spec-bin/dash: 5: dict[foo]=bar: not found
_tmp/spec-bin/dash: 6: declare: not found
_tmp/spec-bin/dash: 7: localdict[spam]=Eggs: not found
_tmp/spec-bin/dash: 1: eval: declare: not found
_tmp/spec-bin/dash: 9: ev[ev1]=ev2: not found
_tmp/spec-bin/dash: 13: Bad substitution
mksh36 declare -g (bash-specific; bash-completion uses it)

stdout:
['', '']
stderr:
_tmp/spec-bin/mksh: <stdin>[11]: declare: not found
_tmp/spec-bin/mksh: <stdin>[11]: declare: not found
_tmp/spec-bin/mksh: <stdin>[11]: declare: not found
_tmp/spec-bin/mksh: <stdin>[11]: "foo": unexpected '"'
_tmp/spec-bin/mksh: <stdin>[13]: "foo": unexpected '"'