Results for assign.test.sh

casedashbashmkshoshosh_ALTdescription
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 FAIL FAIL Env binding not allowed before compound command
detailsdetailsdetailsdetails
10pass pass pass pass pass Trying to run keyword 'for'
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
14ok ok ok pass pass Env binding in readonly/declare disallowed
detailsdetailsdetails
15N-I pass N-I pass pass local -a
detailsdetails
16N-I pass N-I pass pass declare -a
detailsdetails
17N-I pass pass FAIL FAIL typeset -a a[1]=a a[3]=c
detailsdetailsdetails
18N-I pass pass FAIL FAIL indexed LHS without spaces is allowed
detailsdetailsdetails
19N-I pass N-I pass pass declare -f
detailsdetails
20N-I pass N-I pass pass declare -p
detailsdetails
21N-I pass pass pass pass typeset -f
details
22N-I pass BUG pass pass typeset -p
detailsdetails
23N-I ok ok pass pass typeset -r makes a string readonly
detailsdetailsdetails
24N-I ok N-I pass pass typeset -ar makes it readonly
detailsdetailsdetails
25N-I pass pass pass pass typeset -x makes it exported
details

96 passed, 8 ok, 16 known unimplemented, 4 known bugs, 3 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: 
/bin/dash: 1: for: not found
mksh9 Env binding not allowed before compound command

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

[osh status] Expected 2, got 127

stdout:
stderr: 
Unexpected error in execvpe('for', ['for', 'i', 'in', 'a', 'b'], ...): [Errno 2] No such file or directory
osh_ALT9 Env binding not allowed before compound command

[osh_ALT status] Expected 2, got 127

stdout:
stderr: 
Unexpected error in execvpe('for', ['for', 'i', 'in', 'a', 'b'], ...): [Errno 2] No such file or directory
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: 
/bin/dash: 2: Syntax error: "(" unexpected (expecting "}")
mksh15 local -a

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

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

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

stdout:
stderr: 
/bin/dash: 1: typeset: not found
/bin/dash: 2: Bad substitution
osh17 typeset -a a[1]=a a[3]=c

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

stdout:
stderr: 
Line 2 of '<stdin>'
  typeset -a a[1*1]=x a[1+2]=z
             ^
Invalid variable name 'a[1*1]=x'
---
*** Error has no source location info ***
Error parsing AndOr in ParseCommandTerm
---
osh_ALT17 typeset -a a[1]=a a[3]=c

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

stdout:
stderr: 
Line 2 of '<stdin>'
  typeset -a a[1*1]=x a[1+2]=z
             ^
Invalid variable name 'a[1*1]=x'
---
*** Error has no source location info ***
Error parsing AndOr in ParseCommandTerm
---
dash18 indexed LHS without spaces is allowed

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

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

stdout:
[]
stderr:
Unexpected error in execvpe('a[1', ['a[1', 'INSTALL.txt', 'LICENSE.txt', 'Makefile', 'NOTES.txt', 'Python-2.7.13', 'README.md', 'TODO.txt', 'Vagrantfile', '__init__.py', '_bin', '_build', '_chroot', '_deps', '_devbuild', '_release', '_tmp', 'a.txt', 'asdl', 'asdl.txt', 'benchmarks', 'bin', 'build', 'configure', 'core', 'demo', 'doc', 'fastlex.so', 'gold', 'install', 'libc.so', 'local.sh', 'native', 'non-fatal-assign.patch', 'oil', 'oil-version.txt', 'opy', 'osh', 'ovm', 'p.txt', 'r.txt', 'release-roadmap.txt', 'scripts', 'spec', 'test', 'testdata', 'tools', 'trace-notes.txt', 'web', '1]=x', 'a[', '1', '+', '2', ']=z'], ...): [Errno 2] No such file or directory
osh_ALT18 indexed LHS without spaces is allowed

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

stdout:
[]
stderr:
Unexpected error in execvpe('a[1', ['a[1', 'INSTALL.txt', 'LICENSE.txt', 'Makefile', 'NOTES.txt', 'Python-2.7.13', 'README.md', 'TODO.txt', 'Vagrantfile', '__init__.py', '_bin', '_build', '_chroot', '_deps', '_devbuild', '_release', '_tmp', 'a.txt', 'asdl', 'asdl.txt', 'benchmarks', 'bin', 'build', 'configure', 'core', 'demo', 'doc', 'fastlex.so', 'gold', 'install', 'libc.so', 'local.sh', 'native', 'non-fatal-assign.patch', 'oil', 'oil-version.txt', 'opy', 'osh', 'ovm', 'p.txt', 'r.txt', 'release-roadmap.txt', 'scripts', 'spec', 'test', 'testdata', 'tools', 'trace-notes.txt', 'web', '1]=x', 'a[', '1', '+', '2', ']=z'], ...): [Errno 2] No such file or directory
dash19 declare -f

stdout:
127
127
127
stderr:
/bin/dash: 2: declare: not found
/bin/dash: 5: declare: not found
/bin/dash: 8: declare: not found
mksh19 declare -f

stdout:
127
127
127
stderr:
/bin/mksh: <stdin>[2]: declare: not found
/bin/mksh: <stdin>[5]: declare: not found
/bin/mksh: <stdin>[8]: declare: not found
dash20 declare -p

stdout:
127
127
127
stderr:
/bin/dash: 2: declare: not found
/bin/dash: 5: declare: not found
/bin/dash: 8: declare: not found
mksh20 declare -p

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

stdout:
127
127
127
stderr:
/bin/dash: 1: typeset: not found
/bin/dash: 4: typeset: not found
/bin/dash: 7: typeset: not found
dash22 typeset -p

stdout:
127
127
127
stderr:
/bin/dash: 2: typeset: not found
/bin/dash: 5: typeset: not found
/bin/dash: 8: typeset: not found
mksh22 typeset -p

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

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

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

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

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

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

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

stdout:
None
stderr:
/bin/dash: 1: typeset: not found