| case | dash | bash | mksh | osh | description |
| 0 | pass | pass | pass | pass | Locals don't leak |
| 1 | pass | pass | pass | pass | Globals leak |
| 2 | pass | pass | pass | FAIL | Return statement |
| details | |||||
| 3 | N-I | N-I | N-I | pass | Return at top level is error |
| details | details | details | |||
| 4 | pass | pass | pass | pass | Dynamic Scope |
| 5 | pass | pass | pass | pass | Dynamic Scope Mutation (wow this is bad) |
| 6 | pass | pass | pass | pass | Assign local separately |
| 7 | pass | pass | pass | pass | Assign a local and global on same line |
28 passed, 0 ok, 3 known unimplemented, 0 known bugs, 1 failed, 0 skipped
| osh | 2 Return statement [osh status] Expected 42, got 1 stdout: onestderr: Traceback (most recent call last):
File "bin/osh", line 430, in <module>
main(sys.argv)
File "bin/osh", line 417, in main
sys.exit(OilMain(argv))
File "bin/osh", line 400, in OilMain
status = OshMain(main_argv)
File "bin/osh", line 359, in OshMain
status = ex.Execute(node)
File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1212, in Execute
status = self._Execute(node)
File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1057, in _Execute
status = self._Execute(child) # last status wins
File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 984, in _Execute
status = thunk.RunInParent()
File "/home/andy/git/oil/bin/../core/process.py", line 417, in RunInParent
return self.ex.RunFunc(self.func_node, self.argv)
File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 757, in RunFunc
status = self._Execute(func_body)
File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1057, in _Execute
status = self._Execute(child) # last status wins
File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1040, in _Execute
_, val = self.ev.EvalWordToString(node.arg_word)
TypeError: 'Str' object is not iterable
|
| dash | 3 Return at top level is error stdout: stderr: |
| bash | 3 Return at top level is error stdout: badstderr: /bin/bash: line 1: return: can only `return' from a function or sourced script |
| mksh | 3 Return at top level is error stdout: stderr: |