Results for sh-options.test.sh

statusoshosh_.pyosh_.cc
pass 383434
ok 222
N-I 222
FAIL 266
total444444
caseoshosh_.pyosh_.ccdescription
0pass pass pass $- with -c
1pass pass pass $- with pipefail
2pass pass pass $- and more options
3pass FAIL FAIL $- with interactive shell
detailsdetails
4pass pass pass pass short options like sh -e
5pass pass pass pass long options like sh -o errexit
6pass pass pass pass shopt options like sh -O nullglob
7pass pass pass can continue after unknown option
8pass pass pass set with both options and argv
9pass pass pass set -o vi/emacs
10pass FAIL FAIL vi and emacs are mutually exclusive
detailsdetails
11pass FAIL FAIL interactive shell starts with emacs mode on
detailsdetails
12pass pass pass nounset
13pass pass pass -u is nounset
14pass pass pass nounset with "$@"
15pass pass pass set -u -- clears argv
16pass pass pass set -u -- x y z
17pass pass pass reset option with long flag
18pass pass pass reset option with short flag
19pass pass pass set -eu (flag parsing)
20FAIL FAIL FAIL -n for no execution (useful with --ast-output)
detailsdetailsdetails
21pass pass pass pipefail
22pass pass pass shopt -p -o prints 'set' options
23pass pass pass shopt -p prints 'shopt' options
24pass pass pass shopt with no flags prints options
25pass pass pass noclobber off
26FAIL FAIL FAIL noclobber on
detailsdetailsdetails
27pass pass pass SHELLOPTS is updated when options are changed
28ok ok ok SHELLOPTS is readonly
detailsdetailsdetails
29ok ok ok set - -
detailsdetailsdetails
30pass pass pass set -o lists options
31pass pass pass set without args lists variables
32pass FAIL FAIL 'set' and 'eval' round trip
detailsdetails
33N-I N-I N-I set without args and array variables (not in OSH)
detailsdetailsdetails
34N-I N-I N-I set without args and assoc array variables (not in OSH)
detailsdetailsdetails
35pass pass pass shopt -q
36pass pass pass shopt -q invalid
37pass pass pass shopt -s strict:all
38pass pass pass shopt allows for backward compatibility like bash
39pass pass pass shopt -p validates option names
40pass pass pass shopt -p -o validates option names
41pass pass pass stubbed out bash options
42pass pass pass shopt -s nounset works in Oil, not in bash
43pass pass pass no-ops not in shopt -p output
106 passed, 6 OK, 6 not implemented, 0 BUG, 14 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

osh_.py3 $- with interactive shell

[osh_.py stdout] Expected 'FALSE\nTRUE\n', got 'FALSE\n'
[osh_.py status] Expected 0, got 1

stdout:
FALSE
stderr:
osh fatal error: 
osh_.cc3 $- with interactive shell

[osh_.cc stdout] Expected 'FALSE\nTRUE\n', got 'FALSE\n'
[osh_.cc status] Expected 0, got 1

stdout:
FALSE
stderr:
terminate called after throwing an instance of 'NotImplementedError*'
osh_.py10 vi and emacs are mutually exclusive

[osh_.py stdout] Expected 'set +o emacs\nset +o vi\n___\nset -o emacs\nset +o vi\n___\nset +o emacs\nset -o vi\n___\n', got 'set +o emacs\nset +o vi\n___\nset -o emacs\nset +o vi\n___\nset -o emacs\nset -o vi\n___\n'

stdout:
set +o emacs
set +o vi
___
set -o emacs
set +o vi
___
set -o emacs
set -o vi
___
stderr:
osh_.cc10 vi and emacs are mutually exclusive

[osh_.cc stdout] Expected 'set +o emacs\nset +o vi\n___\nset -o emacs\nset +o vi\n___\nset +o emacs\nset -o vi\n___\n', got 'set +o emacs\nset +o vi\n___\nset -o emacs\nset +o vi\n___\nset -o emacs\nset -o vi\n___\n'

stdout:
set +o emacs
set +o vi
___
set -o emacs
set +o vi
___
set -o emacs
set -o vi
___
stderr:
osh_.py11 interactive shell starts with emacs mode on

[osh_.py stdout] Expected 'non-interactive\n1\n1\ninteractive\n0\n1\n', got 'non-interactive\n1\n1\ninteractive\n'
[osh_.py status] Expected 0, got 1

stdout:
non-interactive
1
1
interactive
stderr:
osh fatal error: 
osh_.cc11 interactive shell starts with emacs mode on

[osh_.cc stdout] Expected 'non-interactive\n1\n1\ninteractive\n0\n1\n', got 'non-interactive\n1\n1\ninteractive\n'
[osh_.cc status] Expected 0, got 129

stdout:
non-interactive
1
1
interactive
stderr:
terminate called after throwing an instance of 'NotImplementedError*'
osh20 -n for no execution (useful with --ast-output)

[osh stdout] Expected '1\n', got '1\n2\n3\n'

stdout:
1
2
3
stderr:
osh_.py20 -n for no execution (useful with --ast-output)

[osh_.py stdout] Expected '1\n', got '1\n2\n3\n'

stdout:
1
2
3
stderr:
osh_.cc20 -n for no execution (useful with --ast-output)

[osh_.cc stdout] Expected '1\n', got '1\n2\n3\n'

stdout:
1
2
3
stderr:
osh26 noclobber on

[osh stdout] Expected u'0\n1\n', got '0\n0\n'

stdout:
0
0
stderr:
rm: cannot remove '/home/uke/oil/_tmp/spec-tmp/sh-options.test.sh/no-clobber': No such file or directory
osh_.py26 noclobber on

[osh_.py stdout] Expected u'0\n1\n', got '0\n0\n'

stdout:
0
0
stderr:
osh_.cc26 noclobber on

[osh_.cc stdout] Expected u'0\n1\n', got '0\n0\n'

stdout:
0
0
stderr:
osh28 SHELLOPTS is readonly

stdout:
stderr: 
  SHELLOPTS=x
  ^~~~~~~~~~
[ stdin ]:1: fatal: Can't assign to readonly value 'SHELLOPTS'
osh_.py28 SHELLOPTS is readonly

stdout:
stderr: 
  SHELLOPTS=x
  ^~~~~~~~~~
[ stdin ]:1: fatal: Can't assign to readonly value 'SHELLOPTS'
osh_.cc28 SHELLOPTS is readonly

stdout:
stderr: 
  SHELLOPTS=x
  ^~~~~~~~~~
[ stdin ]:1: fatal: Can't assign to readonly value 'SHELLOPTS'
osh29 set - -

stdout:
a b
- a b
a b
- -
- +
+ -
--
stderr:
osh_.py29 set - -

stdout:
a b
- a b
a b
- -
- +
+ -
--
stderr:
osh_.cc29 set - -

stdout:
a b
- a b
a b
- -
- +
+ -
--
stderr:
osh_.py32 'set' and 'eval' round trip

[osh_.py stdout] Expected '[ ]\nOK\nOK\nOK\nOK\nOK\n', got '[ ]\n'
[osh_.py status] Expected 0, got 1
[osh_.py stderr] Found 'Traceback (most recent'

stdout:
[ ]
stderr:
Traceback (most recent call last):
  File "/home/uke/oil/bin/osh_eval.py", line 66, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/osh_eval.py", line 34, in main
    None)
  File "/home/uke/oil/core/shell_native.py", line 486, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 332, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 1644, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/uke/oil/osh/cmd_eval.py", line 1482, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 711, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, cmd_st, node.do_fork)
  File "/home/uke/oil/osh/cmd_eval.py", line 550, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, cmd_st, do_fork)
  File "/home/uke/oil/core/executor.py", line 192, in RunSimpleCommand
    status = self.RunBuiltin(builtin_id, cmd_val)
  File "/home/uke/oil/core/executor.py", line 129, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 2
osh_.cc32 'set' and 'eval' round trip

[osh_.cc stdout] Expected '[ ]\nOK\nOK\nOK\nOK\nOK\n', got '[ ]\n'
[osh_.cc status] Expected 0, got -6

stdout:
[ ]
stderr:
terminate called after throwing an instance of 'KeyError*'
osh33 set without args and array variables (not in OSH)

stdout:
stderr: 
osh_.py33 set without args and array variables (not in OSH)

stdout:
stderr: 
osh_.cc33 set without args and array variables (not in OSH)

stdout:
stderr: 
osh34 set without args and assoc array variables (not in OSH)

stdout:
stderr: 
  __assoc[a]=b
  ^~~~~~~~
[ stdin ]:3: fatal: Associative array keys must be strings: $x 'x' "$x" etc.
osh_.py34 set without args and assoc array variables (not in OSH)

stdout:
stderr: 
  __assoc[a]=b
  ^~~~~~~~
[ stdin ]:3: fatal: Associative array keys must be strings: $x 'x' "$x" etc.
osh_.cc34 set without args and assoc array variables (not in OSH)

stdout:
stderr: 
  __assoc[a]=b
  ^~~~~~~~
[ stdin ]:3: fatal: Associative array keys must be strings: $x 'x' "$x" etc.