spec test index / oilshell.org
29 passed, 9 OK, 0 not implemented, 0 BUG, 22 failed, 0 timeouts, 0 cases skipped 1 failed under osh
osh_.cc | 0 String slice [osh_.cc stdout] Expected 'bcd\n', got 'abcdefg\n' stdout: abcdefgstderr: |
osh | 1 Cannot take length of substring slice stdout: stderr: echo ${#v:1:3} ^ [ stdin ]:2: Expected } after length expression |
osh_.py | 1 Cannot take length of substring slice stdout: stderr: echo ${#v:1:3} ^ [ stdin ]:2: Expected } after length expression |
osh_.cc | 1 Cannot take length of substring slice stdout: stderr: echo ${#v:1:3} ^ [ stdin ]:2: Expected } after length expression |
osh_.cc | 2 Out of range string slice: begin [osh_.cc stdout] Expected '_\n0\n', got '_abcdefg\n0\n' stdout: _abcdefg 0stderr: |
osh_.cc | 3 Out of range string slice: length [osh_.cc stdout] Expected '_defg\n0\n', got '_abcdefg\n0\n' stdout: _abcdefg 0stderr: |
osh | 4 String slice: negative begin stdout: stderr: echo ${foo: -4:3} ^~ [ stdin ]:2: warning: The start index of a string slice can't be negative: -4 |
osh_.py | 4 String slice: negative begin stdout: stderr: echo ${foo: -4:3} ^~ [ stdin ]:2: warning: The start index of a string slice can't be negative: -4 |
osh_.cc | 4 String slice: negative begin stdout: stderr: [??? no location ???] warning: The start index of a string slice can't be negative: -4 |
osh | 5 String slice: negative second arg is position, not length stdout: stderr: echo ${foo:3:-1} ${foo: 3: -2} ${foo:3 :-3 } ^~ [ stdin ]:2: warning: The length of a string slice can't be negative: -1 echo ${foo:3:-1} ${foo: 3: -2} ${foo:3 :-3 } ^~ [ stdin ]:2: warning: The length of a string slice can't be negative: -2 echo ${foo:3:-1} ${foo: 3: -2} ${foo:3 :-3 } ^~ [ stdin ]:2: warning: The length of a string slice can't be negative: -3 |
osh_.py | 5 String slice: negative second arg is position, not length stdout: stderr: echo ${foo:3:-1} ${foo: 3: -2} ${foo:3 :-3 } ^~ [ stdin ]:2: warning: The length of a string slice can't be negative: -1 echo ${foo:3:-1} ${foo: 3: -2} ${foo:3 :-3 } ^~ [ stdin ]:2: warning: The length of a string slice can't be negative: -2 echo ${foo:3:-1} ${foo: 3: -2} ${foo:3 :-3 } ^~ [ stdin ]:2: warning: The length of a string slice can't be negative: -3 |
osh_.cc | 5 String slice: negative second arg is position, not length stdout: stderr: [??? no location ???] warning: The length of a string slice can't be negative: -1 [??? no location ???] warning: The length of a string slice can't be negative: -2 [??? no location ???] warning: The length of a string slice can't be negative: -3 |
osh_.cc | 7 String slice with math [osh_.cc stdout] Expected 'def\n', got 'abcdefg\n' stdout: abcdefgstderr: |
osh_.cc | 9 Slice UTF-8 String [osh_.cc stdout] Expected '-\xce\xbc-\n', got '--\xce\xbc--\n' stdout: --μ--stderr: |
osh_.py | 10 Slice string with invalid UTF-8 results in empty string and warning [osh_.py stdout] Expected '--\n', got '' [osh_.py stderr] Expected '[??? no location ???] warning: Invalid start of UTF-8 character\n', got 'Traceback (most recent call last):\n File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 341, in <module>\n status = main(sys.argv)\n File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 228, in main\n status = main_loop.Batch(cmd_ev, c_parser, arena, is_main=True)\n File "/home/andy/git/oilshell/oil/core/main_loop.py", line 165, in Batch\n is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, optimize=optimize)\n File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1450, in ExecuteAndCatch\n status = self._Execute(node)\n File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1334, in _Execute\n status, check_errexit = self._Dispatch(node)\n File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 830, in _Dispatch\n val = self.word_ev.EvalRhsWord(pair.rhs)\n File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1588, in EvalRhsWord\n return self.EvalWordToString(w)\n File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1484, in EvalWordToString\n self._EvalWordPart(p, part_vals, quoted=False)\n File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1318, in _EvalWordPart\n sv = self._EvalCommandSub(part.child, quoted) # type: part_value_t\n File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1945, in _EvalCommandSub\n stdout = self.shell_ex.RunCommandSub(node)\nAttributeError: \'NoneType\' object has no attribute \'RunCommandSub\'\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 341, in <module> status = main(sys.argv) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 228, in main status = main_loop.Batch(cmd_ev, c_parser, arena, is_main=True) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 165, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, optimize=optimize) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1450, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1334, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 830, in _Dispatch val = self.word_ev.EvalRhsWord(pair.rhs) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1588, in EvalRhsWord return self.EvalWordToString(w) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1484, in EvalWordToString self._EvalWordPart(p, part_vals, quoted=False) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1318, in _EvalWordPart sv = self._EvalCommandSub(part.child, quoted) # type: part_value_t File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1945, in _EvalCommandSub stdout = self.shell_ex.RunCommandSub(node) AttributeError: 'NoneType' object has no attribute 'RunCommandSub' |
osh_.cc | 10 Slice string with invalid UTF-8 results in empty string and warning [osh_.cc stdout] Expected '--\n', got '-bcdef-\n' [osh_.cc stderr] Expected '[??? no location ???] warning: Invalid start of UTF-8 character\n', got '' stdout: -bcdef-stderr: |
osh_.py | 11 Slice string with invalid UTF-8 with strict_word_eval [osh_.py stderr] Found 'Traceback (most recent' stdout: slicestderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 341, in <module> status = main(sys.argv) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 228, in main status = main_loop.Batch(cmd_ev, c_parser, arena, is_main=True) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 165, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, optimize=optimize) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1450, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1334, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 830, in _Dispatch val = self.word_ev.EvalRhsWord(pair.rhs) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1588, in EvalRhsWord return self.EvalWordToString(w) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1484, in EvalWordToString self._EvalWordPart(p, part_vals, quoted=False) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1318, in _EvalWordPart sv = self._EvalCommandSub(part.child, quoted) # type: part_value_t File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1945, in _EvalCommandSub stdout = self.shell_ex.RunCommandSub(node) AttributeError: 'NoneType' object has no attribute 'RunCommandSub' |
osh_.cc | 11 Slice string with invalid UTF-8 with strict_word_eval [osh_.cc stdout] Expected 'slice\n', got 'slice\n-bcdef-\n' [osh_.cc status] Expected 1, got 0 stdout: slice -bcdef-stderr: |
osh_.py | 14 Simple ${@:offset} [osh_.py stdout] Expected "['SHELL', '4', '5', '6']\n['4', '5', '6']\n['5', '6']\n", got '' [osh_.py status] Expected 0, got 1 [osh_.py stderr] Found 'Traceback (most recent' stdout: stderr: set 5 Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 341, in <module> status = main(sys.argv) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 228, in main status = main_loop.Batch(cmd_ev, c_parser, arena, is_main=True) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 165, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, optimize=optimize) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1450, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1334, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 830, in _Dispatch val = self.word_ev.EvalRhsWord(pair.rhs) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1588, in EvalRhsWord return self.EvalWordToString(w) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1484, in EvalWordToString self._EvalWordPart(p, part_vals, quoted=False) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1318, in _EvalWordPart sv = self._EvalCommandSub(part.child, quoted) # type: part_value_t File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1945, in _EvalCommandSub stdout = self.shell_ex.RunCommandSub(node) AttributeError: 'NoneType' object has no attribute 'RunCommandSub' |
osh_.cc | 14 Simple ${@:offset} [osh_.cc stdout] Expected "['SHELL', '4', '5', '6']\n['4', '5', '6']\n['5', '6']\n", got "\n(cmd_value.Argv argv:[argv.py '/home/andy/git/oilshell/oil/_bin/osh_eval.dbg'] arg_spids:[36 38])\n(cmd_value.Argv argv:[argv.py '/home/andy/git/oilshell/oil/_bin/osh_eval.dbg'] arg_spids:[44 46])\n" stdout: (cmd_value.Argv argv:[argv.py '/home/andy/git/oilshell/oil/_bin/osh_eval.dbg'] arg_spids:[36 38]) (cmd_value.Argv argv:[argv.py '/home/andy/git/oilshell/oil/_bin/osh_eval.dbg'] arg_spids:[44 46])stderr: set 5 Unhandled SimpleCommand Unhandled SimpleCommand |
osh_.py | 15 ${@:offset} and ${*:offset} [osh_.py stdout] Expected "['-SHELL', 'a', '1', 'b', '2', 'c', '3-']\n['-a', '1', 'b', '2', 'c', '3-']\n['-c', '3-']\n['--']\n['--']\n['-SHELL', 'a', '1', 'b', '2', 'c', '3-']\n['-a', '1', 'b', '2', 'c', '3-']\n['-c', '3-']\n['--']\n['--']\n['-SHELL a 1 b 2 c 3-']\n['-a 1 b 2 c 3-']\n['-c 3-']\n['--']\n['--']\n['-SHELL', 'a 1', 'b 2', 'c 3-']\n['-a 1', 'b 2', 'c 3-']\n['-c 3-']\n['--']\n['--']\n", got "(cmd_value.Argv argv:[fun 'a 1' 'b 2' 'c 3'] arg_spids:[305 307 311 315])\n" stdout: (cmd_value.Argv argv:[fun 'a 1' 'b 2' 'c 3'] arg_spids:[305 307 311 315])stderr: Unhandled SimpleCommand |
osh_.cc | 15 ${@:offset} and ${*:offset} [osh_.cc stdout] Expected "['-SHELL', 'a', '1', 'b', '2', 'c', '3-']\n['-a', '1', 'b', '2', 'c', '3-']\n['-c', '3-']\n['--']\n['--']\n['-SHELL', 'a', '1', 'b', '2', 'c', '3-']\n['-a', '1', 'b', '2', 'c', '3-']\n['-c', '3-']\n['--']\n['--']\n['-SHELL a 1 b 2 c 3-']\n['-a 1 b 2 c 3-']\n['-c 3-']\n['--']\n['--']\n['-SHELL', 'a 1', 'b 2', 'c 3-']\n['-a 1', 'b 2', 'c 3-']\n['-c 3-']\n['--']\n['--']\n", got "(cmd_value.Argv argv:[fun 'a 1' 'b 2' 'c 3'] arg_spids:[305 307 311 315])\n" stdout: (cmd_value.Argv argv:[fun 'a 1' 'b 2' 'c 3'] arg_spids:[305 307 311 315])stderr: Unhandled SimpleCommand |
osh_.py | 16 ${@:offset:length} and ${*:offset:length} [osh_.py stdout] Expected "['-SHELL', 'a', '1-']\n['-a', '1', 'b', '2-']\n['-c', '3-']\n['--']\n['--']\n['-SHELL', 'a', '1-']\n['-a', '1', 'b', '2-']\n['-c', '3-']\n['--']\n['--']\n['-SHELL a 1-']\n['-a 1 b 2-']\n['-c 3-']\n['--']\n['--']\n['-SHELL', 'a 1-']\n['-a 1', 'b 2-']\n['-c 3-']\n['--']\n['--']\n", got "(cmd_value.Argv argv:[fun 'a 1' 'b 2' 'c 3'] arg_spids:[345 347 351 355])\n" stdout: (cmd_value.Argv argv:[fun 'a 1' 'b 2' 'c 3'] arg_spids:[345 347 351 355])stderr: Unhandled SimpleCommand |
osh_.cc | 16 ${@:offset:length} and ${*:offset:length} [osh_.cc stdout] Expected "['-SHELL', 'a', '1-']\n['-a', '1', 'b', '2-']\n['-c', '3-']\n['--']\n['--']\n['-SHELL', 'a', '1-']\n['-a', '1', 'b', '2-']\n['-c', '3-']\n['--']\n['--']\n['-SHELL a 1-']\n['-a 1 b 2-']\n['-c 3-']\n['--']\n['--']\n['-SHELL', 'a 1-']\n['-a 1', 'b 2-']\n['-c 3-']\n['--']\n['--']\n", got "(cmd_value.Argv argv:[fun 'a 1' 'b 2' 'c 3'] arg_spids:[345 347 351 355])\n" stdout: (cmd_value.Argv argv:[fun 'a 1' 'b 2' 'c 3'] arg_spids:[345 347 351 355])stderr: Unhandled SimpleCommand |
osh_.py | 17 ${@:0:1} [osh_.py stdout] Expected 'SHELL\n', got '' [osh_.py status] Expected 0, got 1 [osh_.py stderr] Found 'Traceback (most recent' stdout: stderr: set 4 Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 341, in <module> status = main(sys.argv) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 228, in main status = main_loop.Batch(cmd_ev, c_parser, arena, is_main=True) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 165, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, optimize=optimize) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1450, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1334, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 830, in _Dispatch val = self.word_ev.EvalRhsWord(pair.rhs) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1588, in EvalRhsWord return self.EvalWordToString(w) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1484, in EvalWordToString self._EvalWordPart(p, part_vals, quoted=False) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1318, in _EvalWordPart sv = self._EvalCommandSub(part.child, quoted) # type: part_value_t File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1945, in _EvalCommandSub stdout = self.shell_ex.RunCommandSub(node) AttributeError: 'NoneType' object has no attribute 'RunCommandSub' |
osh_.cc | 17 ${@:0:1} [osh_.cc stdout] Expected 'SHELL\n', got '\n' stdout: stderr: set 4 |
osh_.py | 18 ${array[@]::0} [osh_.py stdout] Expected '[]\n', got '(cmd_value.Argv argv:[argv.py] arg_spids:[9])\n' stdout: (cmd_value.Argv argv:[argv.py] arg_spids:[9])stderr: Unhandled SimpleCommand |
osh_.cc | 18 ${array[@]::0} [osh_.cc stdout] Expected '[]\n', got '(cmd_value.Argv argv:[argv.py 1 2 3] arg_spids:[9 11 11 11])\n' stdout: (cmd_value.Argv argv:[argv.py 1 2 3] arg_spids:[9 11 11 11])stderr: Unhandled SimpleCommand |
osh | 19 ${array[@]::} [osh stdout] Expected '[]\n', got '' [osh status] Expected 0, got 2 stdout: stderr: argv.py ${array[@]::} ^ [ stdin ]:2: Token can't be used in prefix position |
osh_.py | 19 ${array[@]::} [osh_.py stdout] Expected '[]\n', got '' [osh_.py status] Expected 0, got 2 stdout: stderr: argv.py ${array[@]::} ^ [ stdin ]:2: Token can't be used in prefix position |
osh_.cc | 19 ${array[@]::} [osh_.cc stdout] Expected '[]\n', got '' [osh_.cc status] Expected 0, got 2 stdout: stderr: argv.py ${array[@]::} ^ [ stdin ]:2: Token can't be used in prefix position |