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-special: spec test case results

Results for builtin-special.test.sh

statusoshosh-cpp
pass 44
FAIL 44
total88
caseoshosh-cppdescription
0FAIL FAIL : is special and prefix assignments persist after special builtins
detailsdetails
1pass pass readonly is special and prefix assignments persist
2pass pass true is not special
3FAIL FAIL Shift is special and the whole script exits if it returns non-zero
detailsdetails
4FAIL FAIL set is special and fails, even if using || true
detailsdetails
5FAIL FAIL Special builtins can't be redefined as functions
detailsdetails
6pass pass Non-special builtins CAN be redefined as functions
7pass pass command, builtin - both can be redefined, not special (regression)
8 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 : is special and prefix assignments persist after special builtins

[osh stdout] Expected 'foo=bar\n', got 'foo=\n'

stdout:
foo=
stderr:
osh-cpp0 : is special and prefix assignments persist after special builtins

[osh-cpp stdout] Expected 'foo=bar\n', got 'foo=\n'

stdout:
foo=
stderr:
osh3 Shift is special and the whole script exits if it returns non-zero

[osh stdout] Expected u'', got 'status=1\n'
[osh status] Expected 1, got 0

stdout:
status=1
stderr:
osh-cpp3 Shift is special and the whole script exits if it returns non-zero

[osh-cpp stdout] Expected u'', got 'status=1\n'
[osh-cpp status] Expected 1, got 0

stdout:
status=1
stderr:
osh4 set is special and fails, even if using || true

[osh stdout] Expected 'ok\n', got 'ok\nshould not get here\n'
[osh status] Expected 1, got 0

stdout:
ok
should not get here
stderr:
  shopt -s invalid_ || true
  ^~~~~
[ stdin ]:1: 'shopt' got invalid option 'invalid_'
  set -o invalid_ || true
  ^~~
[ stdin ]:3: 'set' got invalid option 'invalid_'
osh-cpp4 set is special and fails, even if using || true

[osh-cpp stdout] Expected 'ok\n', got 'ok\nshould not get here\n'
[osh-cpp status] Expected 1, got 0

stdout:
ok
should not get here
stderr:
  shopt -s invalid_ || true
  ^~~~~
[ stdin ]:1: 'shopt' got invalid option 'invalid_'
  set -o invalid_ || true
  ^~~
[ stdin ]:3: 'set' got invalid option 'invalid_'
osh5 Special builtins can't be redefined as functions

[osh status] Expected 2, got 0

stdout:
status=0
stderr:
osh-cpp5 Special builtins can't be redefined as functions

[osh-cpp status] Expected 2, got 0

stdout:
status=0
stderr: