spec test index / oilshell.org
25 passed, 0 ok, 0 known unimplemented, 2 known bugs, 11 failed, 0 skipped
osh | 2 retrieve indices with ! [osh stdout] Expected "['foo', 'aa', 'a+1']\n", got "['0', '1', '2']\n" stdout: ['0', '1', '2']stderr: |
osh_ALT | 2 retrieve indices with ! [osh_ALT stdout] Expected "['foo', 'aa', 'a+1']\n", got "['0', '1', '2']\n" stdout: ['0', '1', '2']stderr: |
osh-byterun | 2 retrieve indices with ! [osh-byterun stdout] Expected "['foo', 'aa', 'a+1']\n", got "['0', '1', '2']\n" stdout: ['0', '1', '2']stderr: |
osh | 3 $a gives nothing [osh stdout] Expected u'\n', got '[aa]=b [foo]=bar [a+1]=c\n' stdout: [aa]=b [foo]=bar [a+1]=cstderr: |
osh_ALT | 3 $a gives nothing [osh_ALT stdout] Expected u'\n', got '[aa]=b [foo]=bar [a+1]=c\n' stdout: [aa]=b [foo]=bar [a+1]=cstderr: |
osh-byterun | 3 $a gives nothing [osh-byterun stdout] Expected u'\n', got '[aa]=b [foo]=bar [a+1]=c\n' stdout: [aa]=b [foo]=bar [a+1]=cstderr: |
osh | 4 length of dict does not work [osh stdout] Expected '0\n', got '3\n' stdout: 3stderr: |
osh_ALT | 4 length of dict does not work [osh_ALT stdout] Expected '0\n', got '3\n' stdout: 3stderr: |
osh-byterun | 4 length of dict does not work [osh-byterun stdout] Expected '0\n', got '3\n' stdout: 3stderr: |
osh | 5 index by number doesn't work [osh stdout] Expected u'0 1 2 \n', got '0 [aa]=b 1 [foo]=bar 2 [a+1]=c\n' stdout: 0 [aa]=b 1 [foo]=bar 2 [a+1]=cstderr: |
osh_ALT | 5 index by number doesn't work [osh_ALT stdout] Expected u'0 1 2 \n', got '0 [aa]=b 1 [foo]=bar 2 [a+1]=c\n' stdout: 0 [aa]=b 1 [foo]=bar 2 [a+1]=cstderr: |
osh-byterun | 5 index by number doesn't work [osh-byterun stdout] Expected u'0 1 2 \n', got '0 [aa]=b 1 [foo]=bar 2 [a+1]=c\n' stdout: 0 [aa]=b 1 [foo]=bar 2 [a+1]=cstderr: |
osh | 6 index by key name [osh stdout] Expected u'b bar c\n', got '[aa]=b [aa]=b [aa]=b\n' stdout: [aa]=b [aa]=b [aa]=bstderr: Line 3 of '<stdin>' echo "${a[aa]}" "${a[foo]}" "${a['a+1']}" ^~ osh warning: Coercing undefined value to 0 in arithmetic context Line 3 of '<stdin>' echo "${a[aa]}" "${a[foo]}" "${a['a+1']}" ^~~ osh warning: Coercing undefined value to 0 in arithmetic context Line 3 of '<stdin>' echo "${a[aa]}" "${a[foo]}" "${a['a+1']}" ^ osh warning: Invalid integer constant 'a+1' |
osh_ALT | 6 index by key name [osh_ALT stdout] Expected u'b bar c\n', got '[aa]=b [aa]=b [aa]=b\n' stdout: [aa]=b [aa]=b [aa]=bstderr: Line 3 of '<stdin>' echo "${a[aa]}" "${a[foo]}" "${a['a+1']}" ^~ osh warning: Coercing undefined value to 0 in arithmetic context Line 3 of '<stdin>' echo "${a[aa]}" "${a[foo]}" "${a['a+1']}" ^~~ osh warning: Coercing undefined value to 0 in arithmetic context Line 3 of '<stdin>' echo "${a[aa]}" "${a[foo]}" "${a['a+1']}" ^ osh warning: Invalid integer constant 'a+1' |
osh-byterun | 6 index by key name [osh-byterun stdout] Expected u'b bar c\n', got '[aa]=b [aa]=b [aa]=b\n' stdout: [aa]=b [aa]=b [aa]=bstderr: Line 3 of '<stdin>' echo "${a[aa]}" "${a[foo]}" "${a['a+1']}" ^~ osh warning: Coercing undefined value to 0 in arithmetic context Line 3 of '<stdin>' echo "${a[aa]}" "${a[foo]}" "${a['a+1']}" ^~~ osh warning: Coercing undefined value to 0 in arithmetic context Line 3 of '<stdin>' echo "${a[aa]}" "${a[foo]}" "${a['a+1']}" ^ osh warning: Invalid integer constant 'a+1' |
osh | 7 index by quoted string [osh stdout] Expected 'c\n', got '[aa]=b\n' stdout: [aa]=bstderr: Line 3 of '<stdin>' echo "${a['a+1']}" ^ osh warning: Invalid integer constant 'a+1' |
osh_ALT | 7 index by quoted string [osh_ALT stdout] Expected 'c\n', got '[aa]=b\n' stdout: [aa]=bstderr: Line 3 of '<stdin>' echo "${a['a+1']}" ^ osh warning: Invalid integer constant 'a+1' |
osh-byterun | 7 index by quoted string [osh-byterun stdout] Expected 'c\n', got '[aa]=b\n' stdout: [aa]=bstderr: Line 3 of '<stdin>' echo "${a['a+1']}" ^ osh warning: Invalid integer constant 'a+1' |
osh | 8 index by unquoted string [osh stdout] Expected 'c\n', got '' [osh status] Expected 0, got 1 stdout: stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/oil.py", line 732, in <module> main(sys.argv) File "/home/andy/git/oilshell/oil/bin/oil.py", line 701, in main sys.exit(AppBundleMain(argv)) File "/home/andy/git/oilshell/oil/bin/oil.py", line 675, in AppBundleMain status = ShellMain('osh', argv0, main_argv, login_shell) File "/home/andy/git/oilshell/oil/bin/oil.py", line 507, in ShellMain status = main_loop.Batch(ex, c_parser, arena, nodes_out=nodes_out) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 124, in Batch is_control_flow, is_fatal = ex.ExecuteAndCatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1241, in ExecuteAndCatch status = self._Execute(node, fork_external=fork_external) File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1189, in _Execute status, check_errexit = self._Dispatch(node, fork_external) File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 718, in _Dispatch argv = self.word_ev.EvalWordSequence(words) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1123, in EvalWordSequence return self._EvalWordSequence(words) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1096, in _EvalWordSequence self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 897, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 825, in _EvalWordPart self._EvalDoubleQuotedPart(part, part_vals) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 471, in _EvalDoubleQuotedPart self._EvalWordPart(p, part_vals, quoted=True) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 860, in _EvalWordPart self._EvalBracedVarSub(part, part_vals, quoted) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 583, in _EvalBracedVarSub index = self.arith_ev.Eval(anode) File "/home/andy/git/oilshell/oil/osh/expr_eval.py", line 491, in Eval return lhs + rhs TypeError: can only concatenate list (not "int") to list |
osh_ALT | 8 index by unquoted string [osh_ALT stdout] Expected 'c\n', got '' [osh_ALT status] Expected 0, got 1 stdout: stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/oil.py", line 719, in _cpython_main_hook main(sys.argv) File "/home/andy/git/oilshell/oil/bin/oil.py", line 701, in main sys.exit(AppBundleMain(argv)) File "/home/andy/git/oilshell/oil/bin/oil.py", line 694, in AppBundleMain return readlink.main(main_argv) File "/home/andy/git/oilshell/oil/bin/oil.py", line 507, in ShellMain status = main_loop.Batch(ex, c_parser, arena, nodes_out=nodes_out) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 131, in Batch return ex.LastStatus() File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1241, in ExecuteAndCatch status = self._Execute(node, fork_external=fork_external) File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1189, in _Execute status, check_errexit = self._Dispatch(node, fork_external) File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1134, in _Dispatch libc.print_time(real, user, sys_) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1123, in EvalWordSequence return self._EvalWordSequence(words) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1096, in _EvalWordSequence self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 897, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 825, in _EvalWordPart self._EvalDoubleQuotedPart(part, part_vals) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 471, in _EvalDoubleQuotedPart self._EvalWordPart(p, part_vals, quoted=True) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 860, in _EvalWordPart self._EvalBracedVarSub(part, part_vals, quoted) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 583, in _EvalBracedVarSub index = self.arith_ev.Eval(anode) File "/home/andy/git/oilshell/oil/osh/expr_eval.py", line 491, in Eval return lhs + rhs TypeError: can only concatenate list (not "int") to list FATAL: couldn't import from app bundle '_tmp/oil-tar-test/oil-0.6.pre15/_bin/osh' (1) Stripping the oil.ovm binary may cause this error. See https://github.com/oilshell/oil/issues/47 |
osh-byterun | 8 index by unquoted string [osh-byterun stdout] Expected 'c\n', got '' [osh-byterun status] Expected 0, got 1 stdout: stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/opy_.py", line 88, in <module> main(sys.argv) File "/home/andy/git/oilshell/oil/bin/opy_.py", line 72, in main sys.exit(AppBundleMain(argv)) File "/home/andy/git/oilshell/oil/bin/opy_.py", line 64, in AppBundleMain return opy_main.OpyCommandMain(main_argv) File "/home/andy/git/oilshell/oil/opy/opy_main.py", line 502, in OpyCommandMain num_ticks = ovm.run_code_object(co, opy_argv) File "/home/andy/git/oilshell/oil/opy/byterun/execfile.py", line 36, in run_code_object pyvm2.run_code(vm, code, f_globals=main_mod.__dict__) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 88, in run_code val = vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb TypeError: can only concatenate list (not "int") to list |
osh | 9 index by unquoted string as arithmetic [osh stdout] Expected u'\nc\n7\n', got '\n\n7\n' stdout: 7stderr: |
osh_ALT | 9 index by unquoted string as arithmetic [osh_ALT stdout] Expected u'\nc\n7\n', got '\n\n7\n' stdout: 7stderr: |
osh-byterun | 9 index by unquoted string as arithmetic [osh-byterun stdout] Expected u'\nc\n7\n', got '\n\n7\n' stdout: 7stderr: |
osh | 10 WTF index by key name [osh stdout] Expected u'bb dd\n', got '[xx]=bb [xx]=bb\n' stdout: [xx]=bb [xx]=bbstderr: Line 3 of '<stdin>' echo "${a[xx]}" "${a[cc]}" ^~ osh warning: Coercing undefined value to 0 in arithmetic context Line 3 of '<stdin>' echo "${a[xx]}" "${a[cc]}" ^~ osh warning: Coercing undefined value to 0 in arithmetic context |
osh_ALT | 10 WTF index by key name [osh_ALT stdout] Expected u'bb dd\n', got '[xx]=bb [xx]=bb\n' stdout: [xx]=bb [xx]=bbstderr: Line 3 of '<stdin>' echo "${a[xx]}" "${a[cc]}" ^~ osh warning: Coercing undefined value to 0 in arithmetic context Line 3 of '<stdin>' echo "${a[xx]}" "${a[cc]}" ^~ osh warning: Coercing undefined value to 0 in arithmetic context |
osh-byterun | 10 WTF index by key name [osh-byterun stdout] Expected u'bb dd\n', got '[xx]=bb [xx]=bb\n' stdout: [xx]=bb [xx]=bbstderr: Line 3 of '<stdin>' echo "${a[xx]}" "${a[cc]}" ^~ osh warning: Coercing undefined value to 0 in arithmetic context Line 3 of '<stdin>' echo "${a[xx]}" "${a[cc]}" ^~ osh warning: Coercing undefined value to 0 in arithmetic context |
bash | 12 Can't initialize assoc array with indexed array stdout: stderr: _tmp/spec-bin/bash: line 1: A: 1: must use subscript when assigning associative array _tmp/spec-bin/bash: line 1: A: 2: must use subscript when assigning associative array _tmp/spec-bin/bash: line 1: A: 3: must use subscript when assigning associative array |
osh | 12 Can't initialize assoc array with indexed array [osh status] Expected 1, got 0 stdout: stderr: |
osh_ALT | 12 Can't initialize assoc array with indexed array [osh_ALT status] Expected 1, got 0 stdout: stderr: |
osh-byterun | 12 Can't initialize assoc array with indexed array [osh-byterun status] Expected 1, got 0 stdout: stderr: |
bash | 13 Initializing indexed array with with assoc array drops the constants stdout: 3stderr: |
osh | 14 Append to associative array value [osh stdout] Expected "['foobar']\n", got '' [osh status] Expected 0, got 1 stdout: stderr: Line 1 of '<stdin>' declare -A a ^~~~~~~ osh warning: Invalid integer constant 'x' Line 1 of '<stdin>' declare -A a ^~~~~~~ osh warning: Invalid integer constant 'x' Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/oil.py", line 732, in <module> main(sys.argv) File "/home/andy/git/oilshell/oil/bin/oil.py", line 701, in main sys.exit(AppBundleMain(argv)) File "/home/andy/git/oilshell/oil/bin/oil.py", line 675, in AppBundleMain status = ShellMain('osh', argv0, main_argv, login_shell) File "/home/andy/git/oilshell/oil/bin/oil.py", line 507, in ShellMain status = main_loop.Batch(ex, c_parser, arena, nodes_out=nodes_out) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 124, in Batch is_control_flow, is_fatal = ex.ExecuteAndCatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1241, in ExecuteAndCatch status = self._Execute(node, fork_external=fork_external) File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1189, in _Execute status, check_errexit = self._Dispatch(node, fork_external) File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 821, in _Dispatch self.mem, self.exec_opts) File "/home/andy/git/oilshell/oil/osh/expr_eval.py", line 220, in EvalLhsAndLookup raise NotImplementedError NotImplementedError |
osh_ALT | 14 Append to associative array value [osh_ALT stdout] Expected "['foobar']\n", got '' [osh_ALT status] Expected 0, got 1 stdout: stderr: Line 1 of '<stdin>' declare -A a ^~~~~~~ osh warning: Invalid integer constant 'x' Line 1 of '<stdin>' declare -A a ^~~~~~~ osh warning: Invalid integer constant 'x' Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/oil.py", line 719, in _cpython_main_hook main(sys.argv) File "/home/andy/git/oilshell/oil/bin/oil.py", line 701, in main sys.exit(AppBundleMain(argv)) File "/home/andy/git/oilshell/oil/bin/oil.py", line 694, in AppBundleMain return readlink.main(main_argv) File "/home/andy/git/oilshell/oil/bin/oil.py", line 507, in ShellMain status = main_loop.Batch(ex, c_parser, arena, nodes_out=nodes_out) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 131, in Batch return ex.LastStatus() File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1241, in ExecuteAndCatch status = self._Execute(node, fork_external=fork_external) File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1189, in _Execute status, check_errexit = self._Dispatch(node, fork_external) File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1134, in _Dispatch libc.print_time(real, user, sys_) File "/home/andy/git/oilshell/oil/osh/expr_eval.py", line 220, in EvalLhsAndLookup raise NotImplementedError NotImplementedError FATAL: couldn't import from app bundle '_tmp/oil-tar-test/oil-0.6.pre15/_bin/osh' (1) Stripping the oil.ovm binary may cause this error. See https://github.com/oilshell/oil/issues/47 |
osh-byterun | 14 Append to associative array value [osh-byterun stdout] Expected "['foobar']\n", got '' [osh-byterun status] Expected 0, got 1 stdout: stderr: Line 1 of '<stdin>' declare -A a ^~~~~~~ osh warning: Invalid integer constant 'x' Line 1 of '<stdin>' declare -A a ^~~~~~~ osh warning: Invalid integer constant 'x' FATAL: |