status | bash | dash | ash | zsh | mksh | ksh | toysh | sush | brush | osh | |
pass | 11 | 10 | 10 | 12 | 11 | 11 | 11 | 9 | 10 | 11 | |
ok | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
BUG | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | |
FAIL | 0 | 0 | 2 | 0 | 0 | 1 | 1 | 3 | 2 | 1 | |
total | 12 | 12 | 12 | 12 | 12 | 12 | 12 | 12 | 12 | 12 | |
case | bash | dash | ash | zsh | mksh | ksh | toysh | sush | brush | osh | description |
0 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | Locals don't leak |
1 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | Globals leak |
2 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | Return statement |
3 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | Dynamic Scope |
4 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | Dynamic Scope Mutation (wow this is bad) |
5 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | Assign local separately |
6 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | Assign a local and global on same line |
7 | pass | pass | pass | pass | pass | pass | FAIL | FAIL | pass | pass | Return without args gives previous |
details | details | ||||||||||
8 | BUG | ok | FAIL | pass | BUG | FAIL | pass | FAIL | FAIL | pass | return "" (a lot of disagreement) |
details | details | details | details | details | details | details | |||||
9 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | return $empty |
10 | pass | pass | pass | pass | pass | pass | pass | FAIL | pass | FAIL | Subshell function |
details | details | ||||||||||
11 | pass | ok | FAIL | pass | pass | pass | pass | pass | FAIL | pass | Scope of global variable when sourced in function (Shell Functions aren't Closures) |
details | details | details |
106 passed, 2 OK, 0 not implemented, 2 BUG, 10 failed, 0 timeouts, 0 cases skipped 1 failed under osh
toysh | 7 Return without args gives previous [toysh stdout] Expected 'status=42\n', got 'status=0\n' stdout: status=0stderr: |
sush | 7 Return without args gives previous [sush stdout] Expected 'status=42\n', got 'status=0\n' stdout: status=0stderr: |
bash | 8 return "" (a lot of disagreement) stdout: f status=2stderr: main: line 3: return: : numeric argument required |
dash | 8 return "" (a lot of disagreement) stdout: fstderr: dash: 3: return: Illegal number: |
ash | 8 return "" (a lot of disagreement) [ash stdout] Expected 'f\nstatus=0\n', got 'f\n' [ash status] Expected 0, got 2 stdout: fstderr: ash: return: line 3: Illegal number: |
mksh | 8 return "" (a lot of disagreement) stdout: f status=1stderr: mksh: <stdin>[6]: return: : bad number |
ksh | 8 return "" (a lot of disagreement) [ksh stdout] Expected 'f\nstatus=0\n', got 'f\nstatus=1\n' stdout: f status=1stderr: E: ksh: <stdin>[6]: return: bad number: |
sush | 8 return "" (a lot of disagreement) [sush stdout] Expected 'f\nstatus=0\n', got 'f\nstatus=2\n' stdout: f status=2stderr: sush: return: : numeric argument required |
brush | 8 return "" (a lot of disagreement) [brush stdout] Expected 'f\nstatus=0\n', got 'f\nstatus=2\n' stdout: f status=2stderr: error: invalid value '' for '[CODE]': cannot parse integer from empty string For more information, try '--help'. |
sush | 10 Subshell function [sush stdout] Expected 'status=42\nstatus=42\n', got 'status=0\nstatus=0\n' stdout: status=0 status=0stderr: |
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 |
dash | 11 Scope of global variable when sourced in function (Shell Functions aren't Closures) stdout: g = globalstderr: dash: 7: L: parameter not set |
ash | 11 Scope of global variable when sourced in function (Shell Functions aren't Closures) [ash status] Expected 1, got 2 stdout: g = globalstderr: ash: L: parameter not set |
brush | 11 Scope of global variable when sourced in function (Shell Functions aren't Closures) [brush stdout] Expected 'g = global\n', got 'g = global\nL = \n' [brush status] Expected 1, got 0 stdout: g = global L =stderr: |