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 | 13 | 13 | |
| ok | 3 | 3 | |
| FAIL | 1 | 1 | |
| total | 17 | 17 | |
| case | osh | osh-cpp | description |
| 0 | pass | pass | unset PS4 |
| 1 | FAIL | FAIL | set -o verbose prints unevaluated code |
| details | details | ||
| 2 | pass | pass | xtrace with unprintable chars |
| 3 | pass | pass | xtrace with unicode chars |
| 4 | pass | pass | xtrace with paths |
| 5 | pass | pass | xtrace with tabs |
| 6 | pass | pass | xtrace with whitespace, quotes, and backslash |
| 7 | pass | pass | xtrace with newlines |
| 8 | pass | pass | xtrace written before command executes |
| 9 | pass | pass | Assignments and assign builtins |
| 10 | pass | pass | [[ ]] |
| 11 | ok | ok | PS4 is scoped |
| details | details | ||
| 12 | ok | ok | xtrace with variables in PS4 |
| details | details | ||
| 13 | pass | pass | PS4 with unterminated ${ |
| 14 | pass | pass | PS4 with unterminated $( |
| 15 | pass | pass | PS4 with runtime error |
| 16 | ok | ok | Reading $? in PS4 |
| details | details |
26 passed, 6 OK, 0 not implemented, 0 BUG, 1 failed, 0 timeouts, 0 cases skipped 1 failed under osh
| osh | 1 set -o verbose prints unevaluated code [osh stderr] Expected 'x=foo\ny=bar\necho $x\necho $(echo $y)\n', got 'Warning: set -o verbose not implemented\n' stdout: foo barstderr: Warning: set -o verbose not implemented |
| osh-cpp | 1 set -o verbose prints unevaluated code [osh-cpp stderr] Expected 'x=foo\ny=bar\necho $x\necho $(echo $y)\n', got 'Warning: set -o verbose not implemented\n' stdout: foo barstderr: Warning: set -o verbose not implemented |
| osh | 11 PS4 is scoped stdout: one func twostderr: + echo one + f + local PS4='- ' - echo func + echo two |
| osh-cpp | 11 PS4 is scoped stdout: one func twostderr: + echo one + f + local PS4='- ' - echo func + echo two |
| osh | 12 xtrace with variables in PS4 stdout: one twostderr: +1:x=1 +1:echo one +2:x=2 +2:echo two |
| osh-cpp | 12 xtrace with variables in PS4 stdout: one twostderr: +1:x=1 +1:echo one +2:x=2 +2:echo two |
| osh | 16 Reading $? in PS4 stdout: okstderr: [last=0] 'false' [last=1] echo ok |
| osh-cpp | 16 Reading $? in PS4 stdout: okstderr: [last=0] 'false' [last=1] echo ok |