spec test index / oilshell.org
91 passed, 0 OK, 0 not implemented, 0 BUG, 38 failed, 0 timeouts, 0 cases skipped
osh_.cc | 3 -a as unary operator (alias of -e) [osh_.cc stdout] Expected 'status=0\nstatus=1\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed. |
osh_.cc | 5 three args [osh_.cc stdout] Expected 'status=1\nstatus=1\nstatus=0\nstatus=0\nstatus=0\n', got '' [osh_.cc status] Expected 0, got -4 stdout: stderr: |
osh_.cc | 7 test with extra args is syntax error [osh_.cc stdout] Expected 'status=2\nstatus=2\n', got '' [osh_.cc status] Expected 0, got -4 stdout: stderr: |
osh_.cc | 10 ! -a [osh_.cc stdout] Expected 'status=0\n', got 'status=2\n' stdout: status=2stderr: [ -z '' -a ! -z x ] ^ [ stdin ]:1: (test) Unexpected token in boolean expression |
osh_.cc | 11 -o [osh_.cc stdout] Expected 'status=0\n', got 'status=2\n' stdout: status=2stderr: [ -z x -o ! -z x ] ^ [ stdin ]:1: (test) Unexpected token in boolean expression |
osh_.cc | 12 ( ) [osh_.cc stdout] Expected 'status=0\n', got 'status=2\n' stdout: status=2stderr: [ -z '' -a '(' ! -z x ')' ] ^ [ stdin ]:1: (test) Unexpected token in boolean expression |
osh_.cc | 13 ( ) ! -a -o with system version of [ [osh_.cc stdout] Expected 'true\n', got '' [osh_.cc status] Expected 0, got 2 stdout: stderr: command [ --version ^ [ stdin ]:1: missing closing ] command [ -z '' -a '(' ! -z x ')' ] && echo true ^ [ stdin ]:2: (test) Unexpected token in boolean expression |
osh_.cc | 17 [ with unquoted empty var [osh_.cc status] Expected 2, got -4 stdout: stderr: |
osh_.cc | 19 [ '(' foo ] is runtime syntax error [osh_.cc stdout] Expected 'status=2\n', got '' [osh_.cc status] Expected 0, got -4 stdout: stderr: |
osh_.cc | 20 -z '>' implies two token lookahead [osh_.cc stdout] Expected 'true\nfalse\ntrue\n', got 'true\nfalse\n' [osh_.cc status] Expected 0, got 1 stdout: true falsestderr: |
osh_.cc | 21 operator/operand ambiguity with ] [osh_.cc stdout] Expected 'status=0\n', got '' [osh_.cc status] Expected 0, got -4 stdout: stderr: |
osh_.cc | 22 operator/operand ambiguity with -a [osh_.cc stdout] Expected 'status=0\n', got '' [osh_.cc status] Expected 0, got -4 stdout: stderr: |
osh_.cc | 23 -d [osh_.cc stdout] Expected 'status=0\nstatus=1\n', got 'status=0\n' [osh_.cc status] Expected 0, got -6 stdout: status=0stderr: osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed. |
osh_.py | 24 -x [osh_.py stdout] Expected 'no\nyes\nbad\n', got 'echo hi\nno\nbad\n' stdout: echo hi no badstderr: chmod: cannot access '/x': No such file or directory |
osh_.cc | 24 -x [osh_.cc stdout] Expected 'no\nyes\nbad\n', got "(cmd_value.Argv argv:[rm -f '/x'] arg_spids:[0 2 4])\necho hi\n" [osh_.cc status] Expected 0, got -6 stdout: (cmd_value.Argv argv:[rm -f '/x'] arg_spids:[0 2 4]) echo histderr: Unhandled SimpleCommand osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed. |
osh_.py | 25 -r [osh_.py stdout] Expected 'yes\nno\n', got '1\n2\nno\n' stdout: 1 2 nostderr: chmod: cannot access '/testr_no': No such file or directory |
osh_.cc | 25 -r [osh_.cc stdout] Expected 'yes\nno\n', got "1\n2\n(cmd_value.Argv argv:[chmod -r '/testr_no'] arg_spids:[22 24 26])\n" [osh_.cc status] Expected 0, got -6 stdout: 1 2 (cmd_value.Argv argv:[chmod -r '/testr_no'] arg_spids:[22 24 26])stderr: Unhandled SimpleCommand osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed. |
osh_.py | 26 -w [osh_.py stdout] Expected 'yes\nno\n', got '1\n2\nno\n' stdout: 1 2 nostderr: chmod: cannot access '/testw_no': No such file or directory |
osh_.cc | 26 -w [osh_.cc stdout] Expected 'yes\nno\n', got "(cmd_value.Argv argv:[rm -f '/testw_*'] arg_spids:[0 2 4])\n1\n2\n(cmd_value.Argv argv:[chmod -w '/testw_no'] arg_spids:[30 32 34])\n" [osh_.cc status] Expected 0, got -6 stdout: (cmd_value.Argv argv:[rm -f '/testw_*'] arg_spids:[0 2 4]) 1 2 (cmd_value.Argv argv:[chmod -w '/testw_no'] arg_spids:[30 32 34])stderr: Unhandled SimpleCommand Unhandled SimpleCommand osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed. |
osh_.cc | 27 -k for sticky bit [osh_.cc stdout] Expected 'status=0\nstatus=1\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed. |
osh_.py | 28 -h and -L test for symlink [osh_.py stdout] Expected 'no\nno\nis-file\nsymlink\nsymlink\ndangling\ndangling\ndangling is not file\n', got 'no\nno\ndangling is not file\n' stdout: no no dangling is not filestderr: mkdir: cannot create directory ‘/builtin-test-1’: Permission denied touch: cannot touch '/builtin-test-1/zz': No such file or directory ln: failed to create symbolic link '/builtin-test-1/symlink': No such file or directory ln: failed to create symbolic link '/builtin-test-1/dangling': No such file or directory |
osh_.cc | 28 -h and -L test for symlink [osh_.cc stdout] Expected 'no\nno\nis-file\nsymlink\nsymlink\ndangling\ndangling\ndangling is not file\n', got "(cmd_value.Argv argv:[mkdir -p '/builtin-test-1'] arg_spids:[4 6 8])\n(cmd_value.Argv argv:[touch '/builtin-test-1/zz'] arg_spids:[10 12])\n(cmd_value.Argv\n argv: [ln -s -f '/builtin-test-1/zz' '/builtin-test-1/symlink']\n arg_spids: [15 17 19 21 24]\n)\n(cmd_value.Argv\n argv: [ln -s -f '/builtin-test-1/__nonexistent_ZZ__' '/builtin-test-1/dangling']\n arg_spids: [27 29 31 33 36]\n)\n" [osh_.cc status] Expected 0, got -6 stdout: (cmd_value.Argv argv:[mkdir -p '/builtin-test-1'] arg_spids:[4 6 8]) (cmd_value.Argv argv:[touch '/builtin-test-1/zz'] arg_spids:[10 12]) (cmd_value.Argv argv: [ln -s -f '/builtin-test-1/zz' '/builtin-test-1/symlink'] arg_spids: [15 17 19 21 24] ) (cmd_value.Argv argv: [ln -s -f '/builtin-test-1/__nonexistent_ZZ__' '/builtin-test-1/dangling'] arg_spids: [27 29 31 33 36] )stderr: Unhandled SimpleCommand Unhandled SimpleCommand Unhandled SimpleCommand Unhandled SimpleCommand osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed. |
osh_.cc | 29 -t 1 for stdout [osh_.cc stdout] Expected 'status=1\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/osh_bool_stat.h:14: bool bool_stat::isatty(int, Str *, syntax_asdl::word_t *): Assertion `0' failed. |
osh_.py | 31 -ot and -nt [osh_.py stdout] Expected 'older\nnot newer\nnot older than itself\nnot newer than itself\n', got 'not newer\nnot older than itself\nnot newer than itself\n' stdout: not newer not older than itself not newer than itselfstderr: touch: cannot touch '/x': Permission denied touch: missing file operand Try 'touch --help' for more information. |
osh_.cc | 31 -ot and -nt [osh_.cc stdout] Expected 'older\nnot newer\nnot older than itself\nnot newer than itself\n', got "(cmd_value.Argv argv:[touch -d '2017/12/31' '/x'] arg_spids:[0 2 4 6])\n(cmd_value.Argv argv:[touch -d '2018/01/01'] arg_spids:[9 11 13])\n" [osh_.cc status] Expected 0, got -6 stdout: (cmd_value.Argv argv:[touch -d '2017/12/31' '/x'] arg_spids:[0 2 4 6]) (cmd_value.Argv argv:[touch -d '2018/01/01'] arg_spids:[9 11 13])stderr: Unhandled SimpleCommand Unhandled SimpleCommand osh_eval.dbg: cpp/osh_bool_stat.h:22: bool bool_stat::DoBinaryOp(id_kind_asdl::Id_t, Str *, Str *): Assertion `0' failed. |
osh_.py | 33 test -s [osh_.py stdout] Expected 'status=1\nstatus=1\nstatus=0\n', got 'status=1\nstatus=1\nnonempty\nstatus=1\n' stdout: status=1 status=1 nonempty status=1stderr: touch: cannot touch '/empty': Permission denied |
osh_.cc | 33 test -s [osh_.cc stdout] Expected 'status=1\nstatus=1\nstatus=0\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed. |
osh_.cc | 34 test -b -c -S (block, character, socket) [osh_.cc stdout] Expected '-b\nstatus=1\nstatus=1\n-c\nstatus=1\nstatus=1\n-S\nstatus=1\nstatus=1\n', got '-b\n' [osh_.cc status] Expected 0, got -6 stdout: -bstderr: osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed. |
osh_.py | 35 test -p named pipe [osh_.py stdout] Expected 'status=0\nstatus=1\n', got 'status=1\nstatus=1\n' stdout: status=1 status=1stderr: mkfifo: cannot create fifo '/fifo': Permission denied |
osh_.cc | 35 test -p named pipe [osh_.cc stdout] Expected 'status=0\nstatus=1\n', got "(cmd_value.Argv argv:[mkfifo '/fifo'] arg_spids:[0 2])\n" [osh_.cc status] Expected 0, got -6 stdout: (cmd_value.Argv argv:[mkfifo '/fifo'] arg_spids:[0 2])stderr: Unhandled SimpleCommand osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed. |
osh_.py | 36 -G and -O for effective user ID and group ID [osh_.py stdout] Expected 'status=0\nstatus=1\nstatus=0\nstatus=1\n', got 'status=1\nstatus=1\nstatus=1\nstatus=1\n' stdout: status=1 status=1 status=1 status=1stderr: |
osh_.cc | 36 -G and -O for effective user ID and group ID [osh_.cc stdout] Expected 'status=0\nstatus=1\nstatus=0\nstatus=1\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed. |
osh_.py | 37 -u for setuid, -g too [osh_.py stdout] Expected 'status=1\nstatus=0\nstatus=1\nstatus=1\n', got 'status=1\n' [osh_.py status] Expected 0, got 1 [osh_.py stderr] Found 'Traceback (most recent' stdout: status=1stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module> status = main(sys.argv) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, 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 1461, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 547, in _Dispatch cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1868, in EvalWordSequence2 self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1455, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1332, in _EvalWordPart sv = self._EvalCommandSub(part.child, quoted) # type: part_value_t File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1959, in _EvalCommandSub stdout = self.shell_ex.RunCommandSub(node) AttributeError: 'NoneType' object has no attribute 'RunCommandSub' |
osh_.cc | 37 -u for setuid, -g too [osh_.cc stdout] Expected 'status=1\nstatus=0\nstatus=1\nstatus=1\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed. |
osh_.cc | 40 -nt -ot [osh_.cc status] Expected 1, got -6 stdout: stderr: osh_eval.dbg: cpp/osh_bool_stat.h:22: bool bool_stat::DoBinaryOp(id_kind_asdl::Id_t, Str *, Str *): Assertion `0' failed. |
osh_.py | 41 -ef [osh_.py stdout] Expected 'same\nsame\ndifferent\ndifferent\n', got 'different\ndifferent\n' stdout: different differentstderr: touch: cannot touch '/left': Permission denied touch: cannot touch '/right': Permission denied ln: failed to access '/left': No such file or directory |
osh_.cc | 41 -ef [osh_.cc stdout] Expected 'same\nsame\ndifferent\ndifferent\n', got "(cmd_value.Argv argv:[touch '/left' '/right'] arg_spids:[8 10 12])\n(cmd_value.Argv argv:[ln -f '/left' '/hardlink'] arg_spids:[14 16 18 21])\n" [osh_.cc status] Expected 0, got -6 stdout: (cmd_value.Argv argv:[touch '/left' '/right'] arg_spids:[8 10 12]) (cmd_value.Argv argv:[ln -f '/left' '/hardlink'] arg_spids:[14 16 18 21])stderr: Unhandled SimpleCommand Unhandled SimpleCommand osh_eval.dbg: cpp/osh_bool_stat.h:22: bool bool_stat::DoBinaryOp(id_kind_asdl::Id_t, Str *, Str *): Assertion `0' failed. |
osh_.cc | 42 Overflow error [osh_.cc stdout] Expected 'status=2\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/osh_bool_stat.h:14: bool bool_stat::isatty(int, Str *, syntax_asdl::word_t *): Assertion `0' failed. |