Results for sh-func.test.sh

statusdashbashmkshoshosh_ALT
pass 1111111111
ok 10000
BUG 01100
FAIL 00011
total1212121212
casedashbashmkshoshosh_ALTdescription
0pass pass pass pass pass Locals don't leak
1pass pass pass pass pass Globals leak
2pass pass pass pass pass Return statement
3pass pass pass pass pass Dynamic Scope
4pass pass pass pass pass Dynamic Scope Mutation (wow this is bad)
5pass pass pass pass pass Assign local separately
6pass pass pass pass pass Assign a local and global on same line
7pass pass pass pass pass Return without args gives previous
8ok BUG BUG pass pass return "" (a lot of disagreement)
detailsdetailsdetails
9pass pass pass pass pass return $empty
10pass pass pass FAIL FAIL Subshell function
detailsdetails
11pass 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

Details on runs that didn't PASS

dash8 return "" (a lot of disagreement)

stdout:
f
stderr:
dash: 3: return: Illegal number: 
bash8 return "" (a lot of disagreement)

stdout:
f
status=2
stderr:
main: line 3: return: : numeric argument required
mksh8 return "" (a lot of disagreement)

stdout:
f
status=1
stderr:
mksh: <stdin>[6]: return: : bad number
osh10 Subshell function

[osh stdout] Expected 'status=42\nstatus=42\n', got 'status=42\n'
[osh status] Expected 0, got 1

stdout:
status=42
stderr:
  g() ( return 42 )
        ^~~~~~
[ stdin ]:2: fatal: Invalid control flow 'return' in pipeline / subshell / background
osh_ALT10 Subshell function

[osh_ALT stdout] Expected 'status=42\nstatus=42\n', got 'status=42\n'
[osh_ALT status] Expected 0, got 1

stdout:
status=42
stderr:
  g() ( return 42 )
        ^~~~~~
[ stdin ]:2: fatal: Invalid control flow 'return' in pipeline / subshell / background