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

Results for command_.test.sh

statusoshosh-cpp
pass 1414
ok 11
total1515
caseoshosh-cppdescription
0pass pass Command block
1pass pass Permission denied
2pass pass Not a dir
3pass pass Name too long
4pass pass External programs don't have _OVM in environment
5pass pass File with no shebang is executed
6pass pass File with relative path and no shebang is executed
7pass pass File in relative subdirectory and no shebang is executed
8pass pass $PATH lookup
9pass pass filling $PATH cache, then insert the same command earlier in cache
10pass pass filling $PATH cache, then deleting command
11pass pass Non-executable on $PATH
12pass pass hash without args prints the cache
13pass pass hash with args
14ok ok hash -r doesn't allow additional args
detailsdetails
28 passed, 2 OK, 0 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh14 hash -r doesn't allow additional args

stdout:
status=2
stderr:
  hash -r whoami >/dev/null  # avoid weird output with mksh
  ^~~~
[ stdin ]:1: 'hash' got extra arguments after -r
osh-cpp14 hash -r doesn't allow additional args

stdout:
status=2
stderr:
  hash -r whoami >/dev/null  # avoid weird output with mksh
  ^~~~
[ stdin ]:1: 'hash' got extra arguments after -r