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

Results for builtin-type-bash.test.sh

statusoshosh-cpp
pass 2828
ok 22
total3030
caseoshosh-cppdescription
0pass pass type -t -> function
1pass pass type -t -> alias
2pass pass type -t -> builtin
3pass pass type -t -> keyword
4pass pass type -t control flow
5pass pass type -t -> file
6pass pass type -t doesn't find non-executable (like command -v)
7pass pass type -t -> not found
8pass pass type -p and -P builtin -> file
9pass pass type -a -P gives multiple files
10pass pass type -p builtin -> not found
11pass pass type -p builtin -> not a file
12pass pass type -P builtin -> not found
13pass pass type -P builtin -> not a file
14pass pass type -P builtin -> not a file but file found
15pass pass type -f builtin -> not found
16pass pass type -f builtin -> function and file exists
17ok ok type -a -> function; prints shell source code
detailsdetails
18pass pass type -ap -> function
19pass pass type -a -> alias; prints alias definition
20pass pass type -ap -> alias
21pass pass type -a -> builtin
22pass pass type -ap -> builtin
23pass pass type -a -> keyword
24pass pass type -a -> file
25pass pass type -ap -> file; abbreviated
26pass pass type -a -> builtin and file
27ok ok type -a -> builtin and file and shell function
detailsdetails
28pass pass type -ap -> builtin and file; doesn't print builtin or function
29pass pass type -a -> executable not in PATH
56 passed, 4 OK, 0 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh17 type -a -> function; prints shell source code

stdout:
f is a shell function
stderr:
osh-cpp17 type -a -> function; prints shell source code

stdout:
f is a shell function
stderr:
osh27 type -a -> builtin and file and shell function

stdout:
pwd is a shell builtin
pwd is /bin/pwd
pwd is _tmp/pwd
---
pwd is a shell function
pwd is a shell builtin
pwd is /bin/pwd
pwd is _tmp/pwd
---
pwd is a shell builtin
pwd is /bin/pwd
pwd is _tmp/pwd
stderr:
osh-cpp27 type -a -> builtin and file and shell function

stdout:
pwd is a shell builtin
pwd is /bin/pwd
pwd is _tmp/pwd
---
pwd is a shell function
pwd is a shell builtin
pwd is /bin/pwd
pwd is _tmp/pwd
---
pwd is a shell builtin
pwd is /bin/pwd
pwd is _tmp/pwd
stderr: