spec test index / oilshell.org
status | dash | bash | mksh | osh | osh_ALT | |
pass | 11 | 11 | 11 | 11 | 11 | |
ok | 1 | 0 | 0 | 0 | 0 | |
BUG | 0 | 1 | 1 | 0 | 0 | |
FAIL | 0 | 0 | 0 | 1 | 1 | |
total | 12 | 12 | 12 | 12 | 12 | |
case | dash | bash | mksh | osh | osh_ALT | description |
0 | pass | pass | pass | pass | pass | Locals don't leak |
1 | pass | pass | pass | pass | pass | Globals leak |
2 | pass | pass | pass | pass | pass | Return statement |
3 | pass | pass | pass | pass | pass | Dynamic Scope |
4 | pass | pass | pass | pass | pass | Dynamic Scope Mutation (wow this is bad) |
5 | pass | pass | pass | pass | pass | Assign local separately |
6 | pass | pass | pass | pass | pass | Assign a local and global on same line |
7 | pass | pass | pass | pass | pass | Return without args gives previous |
8 | ok | BUG | BUG | pass | pass | return "" (a lot of disagreement) |
details | details | details | ||||
9 | pass | pass | pass | pass | pass | return $empty |
10 | pass | pass | pass | FAIL | FAIL | Subshell function |
details | details | |||||
11 | pass | pass | pass | pass | pass | Functions can be named func or proc |
55 passed, 1 OK, 0 not implemented, 2 BUG, 1 failed, 0 timeouts, 0 cases skipped 1 failed under osh
dash | 8 return "" (a lot of disagreement) stdout: fstderr: dash: 3: return: Illegal number: |
bash | 8 return "" (a lot of disagreement) stdout: f status=2stderr: main: line 3: return: : numeric argument required |
mksh | 8 return "" (a lot of disagreement) stdout: f status=1stderr: mksh: <stdin>[6]: return: : bad number |
osh | 10 Subshell function [osh stdout] Expected 'status=42\nstatus=42\n', got 'status=42\n' [osh status] Expected 0, got 1 stdout: status=42stderr: g() ( return 42 ) ^~~~~~ [ stdin ]:2: fatal: Invalid control flow 'return' in pipeline / subshell / background |
osh_ALT | 10 Subshell function [osh_ALT stdout] Expected 'status=42\nstatus=42\n', got 'status=42\n' [osh_ALT status] Expected 0, got 1 stdout: status=42stderr: g() ( return 42 ) ^~~~~~ [ stdin ]:2: fatal: Invalid control flow 'return' in pipeline / subshell / background |