spec test index / oilshell.org
case | dash | bash | mksh | osh | osh_ALT | osh-byterun | description |
0 | pass | ok | ok | pass | pass | pass | $- with -c |
details | details | ||||||
1 | N-I | ok | ok | pass | pass | pass | $- with pipefail |
details | details | details | |||||
2 | pass | pass | pass | pass | pass | FAIL | $- with interactive shell |
details | |||||||
3 | pass | pass | pass | pass | pass | pass | sh -c |
4 | pass | pass | pass | pass | pass | pass | empty -c input |
5 | pass | pass | pass | pass | pass | pass | empty stdin |
6 | pass | pass | pass | pass | pass | pass | args are passed |
7 | pass | pass | pass | pass | pass | pass | args that look like flags are passed after script |
8 | pass | pass | pass | pass | pass | pass | args that look like flags are passed after -c |
9 | pass | pass | pass | pass | pass | pass | pass short options on command line |
10 | pass | pass | pass | pass | pass | pass | pass long options on command line |
11 | BUG | pass | BUG | pass | pass | pass | can continue after unknown option |
details | details | ||||||
12 | pass | pass | pass | pass | pass | pass | set with both options and argv |
13 | pass | pass | pass | pass | pass | pass | set -o vi/emacs |
14 | ok | pass | pass | pass | pass | pass | nounset |
details | |||||||
15 | ok | pass | pass | pass | pass | pass | -u is nounset |
details | |||||||
16 | pass | pass | pass | pass | pass | pass | nounset with "$@" |
17 | pass | pass | pass | pass | pass | pass | set -u -- clears argv |
18 | pass | pass | pass | pass | pass | pass | set -u -- x y z |
19 | pass | pass | pass | pass | pass | pass | reset option with long flag |
20 | pass | pass | pass | pass | pass | pass | reset option with short flag |
21 | ok | pass | pass | pass | pass | pass | set -eu (flag parsing) |
details | |||||||
22 | pass | pass | pass | FAIL | FAIL | FAIL | -n for no execution (useful with --ast-output) |
details | details | details | |||||
23 | N-I | pass | pass | pass | pass | pass | pipefail |
details | |||||||
24 | N-I | pass | N-I | pass | pass | pass | shopt -p -o |
details | details | ||||||
25 | N-I | pass | N-I | pass | pass | pass | shopt -p |
details | details | ||||||
26 | pass | pass | pass | pass | pass | pass | noclobber off |
27 | ok | pass | pass | FAIL | FAIL | FAIL | noclobber on |
details | details | details | details | ||||
28 | N-I | pass | N-I | pass | pass | pass | SHELLOPTS is updated when options are changed |
details | details | ||||||
29 | N-I | pass | N-I | FAIL | FAIL | FAIL | SHELLOPTS is readonly |
details | details | details | details | details | |||
30 | pass | pass | pass | FAIL | FAIL | FAIL | set -o lists options |
details | details | details | |||||
31 | pass | pass | pass | FAIL | FAIL | FAIL | set without args lists variables |
details | details | details | |||||
32 | N-I | pass | N-I | pass | pass | pass | shopt -q |
details | details | ||||||
33 | N-I | ok | N-I | pass | pass | pass | shopt -q invalid |
details | details | details | |||||
34 | N-I | pass | N-I | pass | pass | pass | sh -i loads rcfile (when combined with -c) |
details | details |
167 passed, 9 ok, 16 known unimplemented, 2 known bugs, 5 failed, 0 skipped
bash | 0 $- with -c stdout: huBcstderr: |
mksh | 0 $- with -c stdout: uhcstderr: |
dash | 1 $- with pipefail stdout: stderr: _tmp/spec-bin/dash: 1: set: Illegal option -o pipefail |
bash | 1 $- with pipefail stdout: huBsstderr: |
mksh | 1 $- with pipefail stdout: ushstderr: |
osh-byterun | 2 $- with interactive shell [osh-byterun stdout] Expected 'FALSE\nTRUE\n', got 'FALSE\n' [osh-byterun status] Expected 0, got 1 stdout: FALSEstderr: Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 93, in __call__ self.func_globals, {}) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 164, in make_frame frame = Frame(code, f_globals, f_locals, self.frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 169, in __init__ self.f_builtins = f_locals['__builtins__'] KeyError: '__builtins__' Error in sys.exitfunc: Traceback (most recent call last): File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 93, in __call__ self.func_globals, {}) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 164, in make_frame frame = Frame(code, f_globals, f_locals, self.frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 169, in __init__ self.f_builtins = f_locals['__builtins__'] KeyError: '__builtins__' osh 'shopt' usage error: Invalid option 'globstar' FATAL: maximum recursion depth exceeded in __instancecheck__ Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 93, in __call__ self.func_globals, {}) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 164, in make_frame frame = Frame(code, f_globals, f_locals, self.frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 169, in __init__ self.f_builtins = f_locals['__builtins__'] KeyError: '__builtins__' Error in sys.exitfunc: Traceback (most recent call last): File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 93, in __call__ self.func_globals, {}) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 164, in make_frame frame = Frame(code, f_globals, f_locals, self.frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 169, in __init__ self.f_builtins = f_locals['__builtins__'] KeyError: '__builtins__' |
dash | 11 can continue after unknown option stdout: stderr: _tmp/spec-bin/dash: 2: set: Illegal option -o STRICT |
mksh | 11 can continue after unknown option stdout: stderr: _tmp/spec-bin/mksh: <stdin>[2]: set: STRICT: bad option |
dash | 14 nounset stdout: []stderr: _tmp/spec-bin/dash: 3: unset: parameter not set |
dash | 15 -u is nounset stdout: []stderr: _tmp/spec-bin/dash: 3: unset: parameter not set |
dash | 21 set -eu (flag parsing) stdout: stderr: _tmp/spec-bin/dash: 2: unset: parameter not set |
osh | 22 -n for no execution (useful with --ast-output) [osh stdout] Expected u'1\n', got '1\n2\n3\n' stdout: 1 2 3stderr: |
osh_ALT | 22 -n for no execution (useful with --ast-output) [osh_ALT stdout] Expected u'1\n', got '1\n2\n3\n' stdout: 1 2 3stderr: |
osh-byterun | 22 -n for no execution (useful with --ast-output) [osh-byterun stdout] Expected u'1\n', got '1\n2\n3\n' stdout: 1 2 3stderr: |
dash | 23 pipefail stdout: 0stderr: _tmp/spec-bin/dash: 3: set: Illegal option -o pipefail |
dash | 24 shopt -p -o stdout: stderr: _tmp/spec-bin/dash: 1: shopt: not found _tmp/spec-bin/dash: 3: shopt: not found |
mksh | 24 shopt -p -o stdout: stderr: _tmp/spec-bin/mksh: <stdin>[1]: shopt: not found _tmp/spec-bin/mksh: <stdin>[3]: shopt: not found |
dash | 25 shopt -p stdout: stderr: _tmp/spec-bin/dash: 1: shopt: not found _tmp/spec-bin/dash: 2: shopt: not found _tmp/spec-bin/dash: 3: shopt: not found |
mksh | 25 shopt -p stdout: stderr: _tmp/spec-bin/mksh: <stdin>[1]: shopt: not found _tmp/spec-bin/mksh: <stdin>[2]: shopt: not found _tmp/spec-bin/mksh: <stdin>[3]: shopt: not found |
dash | 27 noclobber on stdout: 0 2stderr: _tmp/spec-bin/dash: 5: cannot create /home/andy/git/oilshell/oil/_tmp/spec-tmp/sh-options.test.sh/no-clobber: File exists |
osh | 27 noclobber on [osh stdout] Expected u'0\n1\n', got '0\n0\n' stdout: 0 0stderr: |
osh_ALT | 27 noclobber on [osh_ALT stdout] Expected u'0\n1\n', got '0\n0\n' stdout: 0 0stderr: |
osh-byterun | 27 noclobber on [osh-byterun stdout] Expected u'0\n1\n', got '0\n0\n' stdout: 0 0stderr: |
dash | 28 SHELLOPTS is updated when options are changed stdout: 1 1 1stderr: + echo + grep -q xtrace + echo 1 + set +x |
mksh | 28 SHELLOPTS is updated when options are changed stdout: 1 1 1stderr: + echo + grep -q xtrace + echo 1 + set +x |
dash | 29 SHELLOPTS is readonly stdout: status=0stderr: |
mksh | 29 SHELLOPTS is readonly stdout: status=0stderr: |
osh | 29 SHELLOPTS is readonly [osh stdout] Expected 'status=1\n', got '' [osh status] Expected 0, got 1 stdout: stderr: *** Error has no source location info *** fatal: Can't assign to readonly value 'SHELLOPTS' |
osh_ALT | 29 SHELLOPTS is readonly [osh_ALT stdout] Expected 'status=1\n', got '' [osh_ALT status] Expected 0, got 1 stdout: stderr: *** Error has no source location info *** fatal: Can't assign to readonly value 'SHELLOPTS' |
osh-byterun | 29 SHELLOPTS is readonly [osh-byterun stdout] Expected 'status=1\n', got '' [osh-byterun status] Expected 0, got 1 stdout: stderr: *** Error has no source location info *** fatal: Can't assign to readonly value 'SHELLOPTS' |
osh | 30 set -o lists options [osh status] Expected 0, got 1 stdout: stderr: osh 'set' usage error: Expected argument for option |
osh_ALT | 30 set -o lists options [osh_ALT status] Expected 0, got 1 stdout: stderr: osh 'set' usage error: Expected argument for option |
osh-byterun | 30 set -o lists options [osh-byterun status] Expected 0, got 1 stdout: stderr: osh 'set' usage error: Expected argument for option |
osh | 31 set without args lists variables [osh status] Expected 0, got 1 stdout: stderr: |
osh_ALT | 31 set without args lists variables [osh_ALT status] Expected 0, got 1 stdout: stderr: |
osh-byterun | 31 set without args lists variables [osh-byterun status] Expected 0, got 1 stdout: stderr: |
dash | 32 shopt -q stdout: nullglob=127 nullglob=127 nullglob,failglob=127 nullglob,failglob=127stderr: _tmp/spec-bin/dash: 1: shopt: not found _tmp/spec-bin/dash: 3: shopt: not found _tmp/spec-bin/dash: 4: shopt: not found _tmp/spec-bin/dash: 6: shopt: not found _tmp/spec-bin/dash: 8: shopt: not found _tmp/spec-bin/dash: 9: shopt: not found |
mksh | 32 shopt -q stdout: nullglob=127 nullglob=127 nullglob,failglob=127 nullglob,failglob=127stderr: _tmp/spec-bin/mksh: <stdin>[1]: shopt: not found _tmp/spec-bin/mksh: <stdin>[3]: shopt: not found _tmp/spec-bin/mksh: <stdin>[4]: shopt: not found _tmp/spec-bin/mksh: <stdin>[6]: shopt: not found _tmp/spec-bin/mksh: <stdin>[8]: shopt: not found _tmp/spec-bin/mksh: <stdin>[9]: shopt: not found |
dash | 33 shopt -q invalid stdout: invalidZZ=127stderr: _tmp/spec-bin/dash: 1: shopt: not found |
bash | 33 shopt -q invalid stdout: invalidZZ=1stderr: _tmp/spec-bin/bash: line 1: shopt: invalidZZ: invalid shell option name |
mksh | 33 shopt -q invalid stdout: invalidZZ=127stderr: _tmp/spec-bin/mksh: <stdin>[1]: shopt: not found |
dash | 34 sh -i loads rcfile (when combined with -c) stdout: 1stderr: _tmp/spec-bin/dash: 0: Illegal option -- |
mksh | 34 sh -i loads rcfile (when combined with -c) stdout: 1stderr: _tmp/spec-bin/mksh: _tmp/spec-bin/mksh: --: unknown option |