spec test index / oilshell.org
90 passed, 6 OK, 5 not implemented, 0 BUG, 31 failed, 0 timeouts, 0 cases skipped 2 failed under osh
osh_.cc | 0 $- with -c [osh_.cc stdout] Expected 'u\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/pylib_path_stat.h:10: bool path_stat::exists(Str*): Assertion `0' failed. |
osh_.py | 3 $- with interactive shell [osh_.py stdout] Expected 'FALSE\nTRUE\n', got 'FALSE\n' [osh_.py status] Expected 0, got 1 stdout: FALSEstderr: osh fatal error: |
osh_.cc | 3 $- with interactive shell [osh_.cc stdout] Expected 'FALSE\nTRUE\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh_.cc | 4 pass short options like sh -e [osh_.cc status] Expected 1, got -6 stdout: stderr: osh_eval.opt: cpp/pylib_path_stat.h:10: bool path_stat::exists(Str*): Assertion `0' failed. |
osh_.cc | 5 pass long options like sh -o errexit [osh_.cc status] Expected 1, got -6 stdout: stderr: osh_eval.opt: cpp/pylib_path_stat.h:10: bool path_stat::exists(Str*): Assertion `0' failed. |
osh_.cc | 6 pass shopt options like sh -O nullglob [osh_.cc stdout] Expected 'foo *.nonexistent bar\nfoo bar\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/pylib_path_stat.h:10: bool path_stat::exists(Str*): Assertion `0' failed. |
osh_.py | 10 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_.cc | 10 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 '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh_.py | 11 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 interactivestderr: osh fatal error: |
osh_.cc | 11 interactive shell starts with emacs mode on [osh_.cc stdout] Expected 'non-interactive\n1\n1\ninteractive\n0\n1\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/pylib_path_stat.h:10: bool path_stat::exists(Str*): Assertion `0' failed. |
osh | 20 -n for no execution (useful with --ast-output) [osh stdout] Expected '1\n', got '1\n2\n3\n' stdout: 1 2 3stderr: |
osh_.py | 20 -n for no execution (useful with --ast-output) [osh_.py stdout] Expected '1\n', got '1\n2\n3\n' stdout: 1 2 3stderr: |
osh_.cc | 20 -n for no execution (useful with --ast-output) [osh_.cc stdout] Expected '1\n', got '1\n2\n3\n' stdout: 1 2 3stderr: dumb_alloc: gNumNew = 2224 gNumDelete = 192 gMemPos = 74480 gNumMalloc = 178 gNumFree = 0 gMemPos2 = 12048 |
osh_.cc | 21 pipefail [osh_.cc stdout] Expected '0\n2\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh_.cc | 23 shopt -p prints 'shopt' options [osh_.cc stdout] Expected 'shopt -u nullglob\nshopt -s nullglob\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: _build/cpp/consts.cc:865: Str* consts::OptionName(option_asdl::option_t): Assertion `0' failed. |
osh_.cc | 24 shopt with no flags prints options [osh_.cc stdout] Expected '2 one.txt\nnullglob\nfailglob\n1\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:143: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 25 noclobber off [osh_.cc stdout] Expected 'foo\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:143: void posix::dup2(int, int): Assertion `0' failed. |
osh | 26 noclobber on [osh stdout] Expected u'0\n1\n', got '0\n0\n' stdout: 0 0stderr: rm: cannot remove '/home/travis/build/oilshell/oil/_tmp/spec-tmp/sh-options.test.sh/no-clobber': No such file or directory |
osh_.py | 26 noclobber on [osh_.py stdout] Expected u'0\n1\n', got '0\n0\n' stdout: 0 0stderr: |
osh_.cc | 26 noclobber on [osh_.cc stdout] Expected u'0\n1\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:143: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 27 SHELLOPTS is updated when options are changed [osh_.cc stdout] Expected u'1\n0\n1\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh | 28 SHELLOPTS is readonly stdout: stderr: SHELLOPTS=x ^~~~~~~~~~ [ stdin ]:1: fatal: Can't assign to readonly value 'SHELLOPTS' |
osh_.py | 28 SHELLOPTS is readonly stdout: stderr: SHELLOPTS=x ^~~~~~~~~~ [ stdin ]:1: fatal: Can't assign to readonly value 'SHELLOPTS' |
osh_.cc | 28 SHELLOPTS is readonly stdout: stderr: SHELLOPTS=x ^~~~~~~~~~ [ stdin ]:1: fatal: Can't assign to readonly value 'SHELLOPTS' dumb_alloc: gNumNew = 1638 gNumDelete = 98 gMemPos = 58016 gNumMalloc = 29 gNumFree = 0 gMemPos2 = 9664 |
osh | 29 set - - stdout: a b - a b a b - - - + + - --stderr: |
osh_.py | 29 set - - stdout: a b - a b a b - - - + + - --stderr: |
osh_.cc | 29 set - - stdout: a b - a b a b - - - + + - --stderr: dumb_alloc: gNumNew = 3556 gNumDelete = 439 gMemPos = 112544 gNumMalloc = 467 gNumFree = 0 gMemPos2 = 16672 |
osh_.cc | 30 set -o lists options [osh_.cc stdout] Expected 'noexec\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh_.cc | 31 set without args lists variables [osh_.cc stdout] Expected '__GLOBAL=mutated\n__OTHERLOCAL=L\n__mylocal=L\n__var_in_parent_scope=D\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh_.py | 32 '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/travis/build/oilshell/oil/bin/osh_eval.py", line 68, in <module> sys.exit(main(sys.argv)) File "/home/travis/build/oilshell/oil/bin/osh_eval.py", line 36, in main None) File "/home/travis/build/oilshell/oil/core/shell_native.py", line 476, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/travis/build/oilshell/oil/core/main_loop.py", line 324, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags) File "/home/travis/build/oilshell/oil/osh/cmd_eval.py", line 1498, in ExecuteAndCatch status = self._Execute(node) File "/home/travis/build/oilshell/oil/osh/cmd_eval.py", line 1345, in _Execute status, check_errexit = self._Dispatch(node, pipeline_st) File "/home/travis/build/oilshell/oil/osh/cmd_eval.py", line 623, in _Dispatch status = self._RunSimpleCommand(cmd_val, node.do_fork) File "/home/travis/build/oilshell/oil/osh/cmd_eval.py", line 477, in _RunSimpleCommand return self.shell_ex.RunSimpleCommand(cmd_val, do_fork) File "/home/travis/build/oilshell/oil/core/executor.py", line 193, in RunSimpleCommand status = self.RunBuiltin(builtin_id, cmd_val) File "/home/travis/build/oilshell/oil/core/executor.py", line 121, in RunBuiltin builtin_func = self.builtins[builtin_id] KeyError: 2 |
osh_.cc | 32 'set' and 'eval' round trip [osh_.cc stdout] Expected '[ ]\nOK\nOK\nOK\nOK\nOK\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh | 33 set without args and array variables (not in OSH) stdout: stderr: |
osh_.py | 33 set without args and array variables (not in OSH) stdout: stderr: |
osh_.cc | 33 set without args and array variables (not in OSH) [osh_.cc status] Expected 1, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh | 34 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_.py | 34 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_.cc | 34 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. dumb_alloc: gNumNew = 1845 gNumDelete = 148 gMemPos = 64304 gNumMalloc = 60 gNumFree = 0 gMemPos2 = 10160 |
osh_.cc | 37 shopt -s strict:all [osh_.cc stdout] Expected 'shopt -u strict_argv\nshopt -u strict_arith\n-\nshopt -s strict_argv\nshopt -s strict_arith\n-\nshopt -s strict_argv\nshopt -u strict_arith\n-\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh_.cc | 38 shopt allows for backward compatibility like bash [osh_.cc stdout] Expected 'shopt -u nullglob\nstatus=0\nshopt -s nullglob\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: _build/cpp/consts.cc:865: Str* consts::OptionName(option_asdl::option_t): Assertion `0' failed. |
osh_.cc | 39 shopt -p validates option names [osh_.cc stdout] Expected 'status=2\nstatus=2\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: shopt -p nullglob invalid failglob ^~~~~ [ stdin ]:1: 'shopt' got invalid option 'invalid' osh_eval.opt: cpp/posix.h:143: void posix::dup2(int, int): Assertion `0' failed. |
osh_.cc | 42 shopt -s nounset works in Oil, not in bash [osh_.cc stdout] Expected 'status=0\nset -o nounset\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh_.cc | 43 no-ops not in shopt -p output [osh_.cc stdout] Expected '--\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |