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

Results for ysh-var-sub.test.sh

statusoshosh-cpp
FAIL 44
total44
caseoshosh-cppdescription
0FAIL FAIL ${x|html}
detailsdetails
1FAIL FAIL ${x %05d}
detailsdetails
2FAIL FAIL ${.myproc builtin sub}
detailsdetails
3FAIL FAIL $[x] with _ESCAPER
detailsdetails
0 passed, 0 OK, 0 not implemented, 0 BUG, 4 failed, 0 timeouts, 0 cases skipped
4 failed under osh

Details on runs that didn't PASS

osh0 ${x|html}

[osh stdout] Expected 'echo hi 2>&1\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
  echo "${x|html}"
           ^
[ stdin ]:2: fatal: Not implemented
osh-cpp0 ${x|html}

[osh-cpp stdout] Expected 'echo hi 2>&1\n', got ''
[osh-cpp status] Expected 0, got 1

stdout:
stderr: 
  echo "${x|html}"
           ^
[ stdin ]:2: fatal: Not implemented
osh1 ${x %05d}

[osh stdout] Expected '00003\n00003\n', got '00003\n'
[osh status] Expected 0, got 1

stdout:
00003
stderr:
  echo ${x %05d}
          ^
[ stdin ]:3: fatal: Not implemented
osh-cpp1 ${x %05d}

[osh-cpp stdout] Expected '00003\n00003\n', got '00003\n'
[osh-cpp status] Expected 0, got 1

stdout:
00003
stderr:
  echo ${x %05d}
          ^
[ stdin ]:3: fatal: Not implemented
osh2 ${.myproc builtin sub}

[osh stdout] Expected 'builtin sub\n', got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
  proc myproc() {
  ^~~~
[ stdin ]:1: proc is a YSH keyword, but this is OSH.
osh-cpp2 ${.myproc builtin sub}

[osh-cpp stdout] Expected 'builtin sub\n', got ''
[osh-cpp status] Expected 0, got 2

stdout:
stderr: 
  proc myproc() {
  ^~~~
[ stdin ]:1: proc is a YSH keyword, but this is OSH.
osh3 $[x] with _ESCAPER

[osh stdout] Expected 'code echo hi 2>&1\n', got 'code echo hi 2>&1\ncode echo hi 2>&1\n'

stdout:
code echo hi 2>&1
code echo hi 2>&1
stderr:
osh-cpp3 $[x] with _ESCAPER

[osh-cpp stdout] Expected 'code echo hi 2>&1\n', got 'code echo hi 2>&1\ncode echo hi 2>&1\n'

stdout:
code echo hi 2>&1
code echo hi 2>&1
stderr: