Results for sh-options-bash.test.sh

statusbashosh
pass 86
ok 01
N-I 10
FAIL 02
total99
casebashoshdescription
0pass pass SHELLOPTS is updated when options are changed
1pass ok SHELLOPTS is readonly
details
2pass FAIL SHELLOPTS and BASHOPTS are non-empty
details
3pass pass SHELLOPTS reflects flags like sh -x
4pass pass export SHELLOPTS does cross-process tracing
5pass pass export SHELLOPTS does cross-process tracing with bash
6pass pass OSH calling bash with SHELLOPTS does not change braceexpand
7N-I FAIL If shopt --set xtrace is allowed, it should update SHELLOPTS, not BASHOPTS
detailsdetails
8pass pass shopt -s progcomp hostcomplete are stubs (bash-completion)
14 passed, 1 OK, 1 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

osh1 SHELLOPTS is readonly

stdout:
stderr: 
  SHELLOPTS=x
  ^~~~~~~~~~
[ stdin ]:1: fatal: Can't assign to readonly value 'SHELLOPTS'
osh2 SHELLOPTS and BASHOPTS are non-empty

[osh stdout] Expected 'shellopts is set\nbashopts is set\n', got 'shellopts is set\n'
[osh status] Expected 0, got 1

stdout:
shellopts is set
stderr:
  echo bashopts ${BASHOPTS:?} > /dev/null
                  ^~~~~~~~
[ stdin ]:10: fatal: Var BASHOPTS is unset
bash7 If shopt --set xtrace is allowed, it should update SHELLOPTS, not BASHOPTS

stdout:
stderr: 
osh7 If shopt --set xtrace is allowed, it should update SHELLOPTS, not BASHOPTS

[osh stdout] Expected 'SHELLOPTS=xtrace\nSHELLOPTS=xtrace\nSHELLOPTS=\n' Got 'SHELLOPTS=hashall\nSHELLOPTS=hashall:xtrace\nSHELLOPTS=hashall\n'

stdout:
SHELLOPTS=hashall
SHELLOPTS=hashall:xtrace
SHELLOPTS=hashall
stderr:
+ echo 'SHELLOPTS=hashall'
+ set -x
+ echo 'SHELLOPTS=hashall:xtrace'
+ set '+x'