spec test index / oilshell.org
80 passed, 6 OK, 4 not implemented, 0 BUG, 42 failed, 0 timeouts, 0 cases skipped 2 failed under osh
osh_.py | 0 $- with -c [osh_.py stdout] Expected 'u\n', got "(cmd_value.Argv argv:[-o nounset -c 'echo $-'] arg_spids:[2 4 6 8])\n" stdout: (cmd_value.Argv argv:[-o nounset -c 'echo $-'] arg_spids:[2 4 6 8])stderr: Unhandled SimpleCommand |
osh_.cc | 0 $- with -c [osh_.cc stdout] Expected 'u\n', got "(cmd_value.Argv argv:[-o nounset -c 'echo $-'] arg_spids:[2 4 6 8])\n" stdout: (cmd_value.Argv argv:[-o nounset -c 'echo $-'] arg_spids:[2 4 6 8])stderr: Unhandled SimpleCommand |
osh_.py | 3 $- with interactive shell [osh_.py stdout] Expected 'FALSE\nTRUE\n', got 'TRUE\n' stdout: TRUEstderr: |
osh_.cc | 3 $- with interactive shell [osh_.cc stdout] Expected 'FALSE\nTRUE\n', got 'TRUE\n' stdout: TRUEstderr: |
osh_.py | 4 pass short options like sh -e [osh_.py stdout] Expected u'', got "(cmd_value.Argv argv:[-e -c 'false; echo status=$?'] arg_spids:[2 4 6])\n" [osh_.py status] Expected 1, got 0 stdout: (cmd_value.Argv argv:[-e -c 'false; echo status=$?'] arg_spids:[2 4 6])stderr: Unhandled SimpleCommand |
osh_.cc | 4 pass short options like sh -e [osh_.cc stdout] Expected u'', got "(cmd_value.Argv argv:[-e -c 'false; echo status=$?'] arg_spids:[2 4 6])\n" [osh_.cc status] Expected 1, got 0 stdout: (cmd_value.Argv argv:[-e -c 'false; echo status=$?'] arg_spids:[2 4 6])stderr: Unhandled SimpleCommand |
osh_.py | 5 pass long options like sh -o errexit [osh_.py stdout] Expected u'', got "(cmd_value.Argv argv:[-o errexit -c 'false; echo status=$?'] arg_spids:[2 4 6 8])\n" [osh_.py status] Expected 1, got 0 stdout: (cmd_value.Argv argv:[-o errexit -c 'false; echo status=$?'] arg_spids:[2 4 6 8])stderr: Unhandled SimpleCommand |
osh_.cc | 5 pass long options like sh -o errexit [osh_.cc stdout] Expected u'', got "(cmd_value.Argv argv:[-o errexit -c 'false; echo status=$?'] arg_spids:[2 4 6 8])\n" [osh_.cc status] Expected 1, got 0 stdout: (cmd_value.Argv argv:[-o errexit -c 'false; echo status=$?'] arg_spids:[2 4 6 8])stderr: Unhandled SimpleCommand |
osh_.py | 6 pass shopt options like sh -O nullglob [osh_.py stdout] Expected 'foo *.nonexistent bar\nfoo bar\n', got "(cmd_value.Argv argv:['+O' nullglob -c 'echo foo *.nonexistent bar'] arg_spids:[2 5 7 9])\n(cmd_value.Argv argv:[-O nullglob -c 'echo foo *.nonexistent bar'] arg_spids:[15 17 19 21])\n" stdout: (cmd_value.Argv argv:['+O' nullglob -c 'echo foo *.nonexistent bar'] arg_spids:[2 5 7 9]) (cmd_value.Argv argv:[-O nullglob -c 'echo foo *.nonexistent bar'] arg_spids:[15 17 19 21])stderr: Unhandled SimpleCommand Unhandled SimpleCommand |
osh_.cc | 6 pass shopt options like sh -O nullglob [osh_.cc stdout] Expected 'foo *.nonexistent bar\nfoo bar\n', got "(cmd_value.Argv argv:['+O' nullglob -c 'echo foo *.nonexistent bar'] arg_spids:[2 5 7 9])\n(cmd_value.Argv argv:[-O nullglob -c 'echo foo *.nonexistent bar'] arg_spids:[15 17 19 21])\n" stdout: (cmd_value.Argv argv:['+O' nullglob -c 'echo foo *.nonexistent bar'] arg_spids:[2 5 7 9]) (cmd_value.Argv argv:[-O nullglob -c 'echo foo *.nonexistent bar'] arg_spids:[15 17 19 21])stderr: Unhandled SimpleCommand Unhandled SimpleCommand |
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 '___\n___\n___\n' stdout: ___ ___ ___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 '___\n___\n___\n' stdout: ___ ___ ___stderr: |
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\n(cmd_value.Argv argv:[-c 'test -o emacs; echo $?; test -o vi; echo $?'] arg_spids:[51 53])\ninteractive\n(cmd_value.Argv argv:[-i -c 'test -o emacs; echo $?; test -o vi; echo $?'] arg_spids:[65 67 69])\n" stdout: non-interactive (cmd_value.Argv argv:[-c 'test -o emacs; echo $?; test -o vi; echo $?'] arg_spids:[51 53]) interactive (cmd_value.Argv argv:[-i -c 'test -o emacs; echo $?; test -o vi; echo $?'] arg_spids:[65 67 69])stderr: Unhandled SimpleCommand Unhandled SimpleCommand |
osh_.cc | 11 interactive shell starts with emacs mode on [osh_.cc stdout] Expected 'non-interactive\n1\n1\ninteractive\n0\n1\n', got "non-interactive\n(cmd_value.Argv argv:[-c 'test -o emacs; echo $?; test -o vi; echo $?'] arg_spids:[51 53])\ninteractive\n(cmd_value.Argv argv:[-i -c 'test -o emacs; echo $?; test -o vi; echo $?'] arg_spids:[65 67 69])\n" stdout: non-interactive (cmd_value.Argv argv:[-c 'test -o emacs; echo $?; test -o vi; echo $?'] arg_spids:[51 53]) interactive (cmd_value.Argv argv:[-i -c 'test -o emacs; echo $?; test -o vi; echo $?'] arg_spids:[65 67 69])stderr: Unhandled SimpleCommand Unhandled SimpleCommand |
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: |
osh_.py | 21 pipefail [osh_.py stdout] Expected '0\n2\n', got '0\n0\n' stdout: 0 0stderr: |
osh_.cc | 21 pipefail [osh_.cc stdout] Expected '0\n2\n', got '0\n0\n' stdout: 0 0stderr: |
osh_.py | 24 shopt with no flags prints options [osh_.py stdout] Expected '2 one.txt\nnullglob\nfailglob\n1\n', got 'shopt -u nullglob\nshopt -u failglob\n(cmd_value.Argv argv:[wc -l one.txt] arg_spids:[14 16 18])\n(cmd_value.Argv argv:[grep -o nullglob one.txt] arg_spids:[20 22 24 26])\n(cmd_value.Argv argv:[grep -o failglob one.txt] arg_spids:[28 30 32 34])\n' stdout: shopt -u nullglob shopt -u failglob (cmd_value.Argv argv:[wc -l one.txt] arg_spids:[14 16 18]) (cmd_value.Argv argv:[grep -o nullglob one.txt] arg_spids:[20 22 24 26]) (cmd_value.Argv argv:[grep -o failglob one.txt] arg_spids:[28 30 32 34])stderr: [??? no location ???] $HOME isn't defined Unhandled SimpleCommand Unhandled SimpleCommand Unhandled SimpleCommand |
osh_.cc | 24 shopt with no flags prints options [osh_.cc stdout] Expected '2 one.txt\nnullglob\nfailglob\n1\n', got 'shopt -u nullglob\nshopt -u failglob\n(cmd_value.Argv argv:[wc -l one.txt] arg_spids:[14 16 18])\n(cmd_value.Argv argv:[grep -o nullglob one.txt] arg_spids:[20 22 24 26])\n(cmd_value.Argv argv:[grep -o failglob one.txt] arg_spids:[28 30 32 34])\n' stdout: shopt -u nullglob shopt -u failglob (cmd_value.Argv argv:[wc -l one.txt] arg_spids:[14 16 18]) (cmd_value.Argv argv:[grep -o nullglob one.txt] arg_spids:[20 22 24 26]) (cmd_value.Argv argv:[grep -o failglob one.txt] arg_spids:[28 30 32 34])stderr: [??? no location ???] $HOME isn't defined Unhandled SimpleCommand Unhandled SimpleCommand Unhandled SimpleCommand |
osh_.py | 25 noclobber off [osh_.py stdout] Expected 'foo\n', got "foo\nfoo\nfoo\n(cmd_value.Argv argv:[cat '/can-clobber'] arg_spids:[45 47])\n" stdout: foo foo foo (cmd_value.Argv argv:[cat '/can-clobber'] arg_spids:[45 47])stderr: Unhandled SimpleCommand |
osh_.cc | 25 noclobber off [osh_.cc stdout] Expected 'foo\n', got "foo\nfoo\nfoo\n(cmd_value.Argv argv:[cat '/can-clobber'] arg_spids:[45 47])\n" stdout: foo foo foo (cmd_value.Argv argv:[cat '/can-clobber'] arg_spids:[45 47])stderr: Unhandled SimpleCommand |
osh | 26 noclobber on [osh stdout] Expected u'0\n1\n', got '0\n0\n' stdout: 0 0stderr: |
osh_.py | 26 noclobber on [osh_.py stdout] Expected u'0\n1\n', got "(cmd_value.Argv argv:[rm '/no-clobber'] arg_spids:[0 2])\nfoo\n0\nfoo\n0\n" stdout: (cmd_value.Argv argv:[rm '/no-clobber'] arg_spids:[0 2]) foo 0 foo 0stderr: Unhandled SimpleCommand |
osh_.cc | 26 noclobber on [osh_.cc stdout] Expected u'0\n1\n', got "(cmd_value.Argv argv:[rm '/no-clobber'] arg_spids:[0 2])\nfoo\n0\nfoo\n0\n" stdout: (cmd_value.Argv argv:[rm '/no-clobber'] arg_spids:[0 2]) foo 0 foo 0stderr: Unhandled SimpleCommand |
osh_.py | 27 SHELLOPTS is updated when options are changed [osh_.py stdout] Expected u'1\n0\n1\n', got '0\n0\n0\n' stdout: 0 0 0stderr: + echo 0 + set '+x' |
osh_.cc | 27 SHELLOPTS is updated when options are changed [osh_.cc stdout] Expected u'1\n0\n1\n', got '0\n0\n0\n' stdout: 0 0 0stderr: + echo 0 |
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' |
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: |
osh_.py | 30 set -o lists options [osh_.py stdout] Expected 'noexec\n', got '' stdout: stderr: |
osh_.cc | 30 set -o lists options [osh_.cc stdout] Expected 'noexec\n', got '' stdout: stderr: |
osh_.py | 31 set without args lists variables [osh_.py stdout] Expected '__GLOBAL=mutated\n__OTHERLOCAL=L\n__mylocal=L\n__var_in_parent_scope=D\n', got '' stdout: stderr: |
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 '' stdout: stderr: |
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/andy/git/oilshell/oil/bin/osh_eval.py", line 71, in <module> sys.exit(main(sys.argv)) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 35, in main status = pure.Main('osh', arg_r, environ, login_shell, loader, None) File "/home/andy/git/oilshell/oil/core/pure.py", line 449, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1438, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 570, in _Dispatch status = self._RunSimpleCommand(cmd_val, node.do_fork) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 481, in _RunSimpleCommand return self.shell_ex.RunSimpleCommand(cmd_val, do_fork) File "/home/andy/git/oilshell/oil/core/pure.py", line 498, in RunSimpleCommand return self.RunBuiltin(builtin_id, cmd_val) File "/home/andy/git/oilshell/oil/core/pure.py", line 479, 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 '[ ]\n' [osh_.cc status] Expected 0, got -6 stdout: [ ]stderr: osh_eval.dbg: mycpp/mylib.h:689: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: 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) [osh_.py status] Expected 1, got 0 stdout: stderr: |
osh_.cc | 33 set without args and array variables (not in OSH) [osh_.cc status] Expected 1, got 0 stdout: stderr: |
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. |
osh_.py | 37 shopt -s strict:all [osh_.py 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 '-\n-\n-\n' stdout: - - -stderr: |
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 '-\n-\n-\n' stdout: - - -stderr: |
osh_.py | 39 shopt -p validates option names [osh_.py stdout] Expected 'shopt -u nullglob\nstatus=2\nshopt -u nullglob\nstatus=2\n', got "shopt -u nullglob\nstatus=2\nshopt -u nullglob\n(cmd_value.Argv argv:[sed --regexp-extended 's/\\\\s+/ /' '/out.txt'] arg_spids:[31 33 35 39])\nstatus=2\n" stdout: shopt -u nullglob status=2 shopt -u nullglob (cmd_value.Argv argv:[sed --regexp-extended 's/\\s+/ /' '/out.txt'] arg_spids:[31 33 35 39]) status=2stderr: Unhandled SimpleCommand |
osh_.cc | 39 shopt -p validates option names [osh_.cc stdout] Expected 'shopt -u nullglob\nstatus=2\nshopt -u nullglob\nstatus=2\n', got "shopt -u nullglob\nstatus=2\nshopt -u nullglob\n(cmd_value.Argv argv:[sed --regexp-extended 's/\\\\s+/ /' '/out.txt'] arg_spids:[31 33 35 39])\nstatus=2\n" stdout: shopt -u nullglob status=2 shopt -u nullglob (cmd_value.Argv argv:[sed --regexp-extended 's/\\s+/ /' '/out.txt'] arg_spids:[31 33 35 39]) status=2stderr: Unhandled SimpleCommand |
osh_.py | 42 shopt -s nounset doesn't work (may relax this later) [osh_.py stdout] Expected 'status=2\nset +o nounset\n', got 'status=2\n' stdout: status=2stderr: |
osh_.cc | 42 shopt -s nounset doesn't work (may relax this later) [osh_.cc stdout] Expected 'status=2\nset +o nounset\n', got 'status=2\n' stdout: status=2stderr: |