Results for sh-func.test.sh

statusoshosh-cpp
pass 1010
FAIL 11
total1111
caseoshosh-cppdescription
0pass pass Locals don't leak
1pass pass Globals leak
2pass pass Return statement
3pass pass Dynamic Scope
4pass pass Dynamic Scope Mutation (wow this is bad)
5pass pass Assign local separately
6pass pass Assign a local and global on same line
7pass pass Return without args gives previous
8pass pass return "" (a lot of disagreement)
9pass pass return $empty
10FAIL FAIL Subshell function
detailsdetails
20 passed, 0 OK, 0 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

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-cpp10 Subshell function

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

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