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 "$@" } xtrace: spec test case results

Results for xtrace.test.sh

statusoshosh-cpp
pass 1313
ok 33
FAIL 11
total1717
caseoshosh-cppdescription
0pass pass unset PS4
1FAIL FAIL set -o verbose prints unevaluated code
detailsdetails
2pass pass xtrace with unprintable chars
3pass pass xtrace with unicode chars
4pass pass xtrace with paths
5pass pass xtrace with tabs
6pass pass xtrace with whitespace, quotes, and backslash
7pass pass xtrace with newlines
8pass pass xtrace written before command executes
9pass pass Assignments and assign builtins
10pass pass [[ ]]
11ok ok PS4 is scoped
detailsdetails
12ok ok xtrace with variables in PS4
detailsdetails
13pass pass PS4 with unterminated ${
14pass pass PS4 with unterminated $(
15pass pass PS4 with runtime error
16ok ok Reading $? in PS4
detailsdetails
26 passed, 6 OK, 0 not implemented, 0 BUG, 1 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

osh1 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
bar
stderr:
Warning: set -o verbose not implemented
osh-cpp1 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
bar
stderr:
Warning: set -o verbose not implemented
osh11 PS4 is scoped

stdout:
one
func
two
stderr:
+ echo one
+ f
+ local PS4='- '
- echo func
+ echo two
osh-cpp11 PS4 is scoped

stdout:
one
func
two
stderr:
+ echo one
+ f
+ local PS4='- '
- echo func
+ echo two
osh12 xtrace with variables in PS4

stdout:
one
two
stderr:
+1:x=1
+1:echo one
+2:x=2
+2:echo two
osh-cpp12 xtrace with variables in PS4

stdout:
one
two
stderr:
+1:x=1
+1:echo one
+2:x=2
+2:echo two
osh16 Reading $? in PS4

stdout:
ok
stderr:
[last=0] 'false'
[last=1] echo ok
osh-cpp16 Reading $? in PS4

stdout:
ok
stderr:
[last=0] 'false'
[last=1] echo ok