run-file () { local spec_name=$1; shift; local spec_file=spec/$spec_name.test.sh; local suite; suite=$(test/sh_spec.py --print-spec-suite $spec_file); local spec_subdir; case $suite in osh) spec_subdir='osh-cpp' ;; ysh) spec_subdir='ysh-cpp' ;; *) die "Invalid suite $suite" ;; esac; local base_dir=_tmp/spec/$spec_subdir; mkdir -v -p $base_dir; sh-spec $spec_file --timeout 10 --oils-bin-dir $PWD/bin --oils-cpp-bin-dir $REPO_ROOT/_bin/cxx-asan --tsv-output $base_dir/${spec_name}.tsv "$@" }
spec test index / oilshell.org
| status | osh | osh-cpp | |
| pass | 10 | 10 | |
| FAIL | 1 | 1 | |
| total | 11 | 11 | |
| case | osh | osh-cpp | description | 
| 0 | pass | pass | Locals don't leak | 
| 1 | pass | pass | Globals leak | 
| 2 | pass | pass | Return statement | 
| 3 | pass | pass | Dynamic Scope | 
| 4 | pass | pass | Dynamic Scope Mutation (wow this is bad) | 
| 5 | pass | pass | Assign local separately | 
| 6 | pass | pass | Assign a local and global on same line | 
| 7 | pass | pass | Return without args gives previous | 
| 8 | pass | pass | return "" (a lot of disagreement) | 
| 9 | pass | pass | return $empty | 
| 10 | FAIL | FAIL | Subshell function | 
| details | details | 
20 passed, 0 OK, 0 not implemented, 0 BUG, 1 failed, 0 timeouts, 0 cases skipped 1 failed under osh
| 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-cpp | 10 Subshell function [osh-cpp stdout] Expected 'status=42\nstatus=42\n', got 'status=42\n' [osh-cpp status] Expected 0, got 1 stdout: status=42stderr:   g() ( return 42 )
        ^~~~~~
[ stdin ]:2: fatal: Invalid control flow 'return' in pipeline / subshell / background
 |