spec test index / oilshell.org
23 passed, 0 ok, 0 known unimplemented, 3 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 | 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 | 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 | 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 | 6 index by key name [osh stdout] Expected u'b bar c\n', got '' [osh status] Expected 0, got 1 stdout: stderr: echo "${a[aa]}" "${a[foo]}" "${a['a+1']}" ^~ [ stdin ]:3: fatal: Undefined value in arithmetic context (0 if shopt -u strict-arith) |
osh_ALT | 6 index by key name [osh_ALT stdout] Expected u'b bar c\n', got '' [osh_ALT status] Expected 0, got 1 stdout: stderr: echo "${a[aa]}" "${a[foo]}" "${a['a+1']}" ^~ [ stdin ]:3: fatal: Undefined value in arithmetic context (0 if shopt -u strict-arith) |
osh | 7 index by quoted string [osh stdout] Expected 'c\n', got '' [osh status] Expected 0, got 1 stdout: stderr: echo "${a['a+1']}" ^ [ stdin ]:3: fatal: Invalid integer constant 'a+1' |
osh_ALT | 7 index by quoted string [osh_ALT stdout] Expected 'c\n', got '' [osh_ALT status] Expected 0, got 1 stdout: stderr: echo "${a['a+1']}" ^ [ stdin ]:3: fatal: 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 865, in <module> main(sys.argv) File "/home/andy/git/oilshell/oil/bin/oil.py", line 833, in main sys.exit(AppBundleMain(argv)) File "/home/andy/git/oilshell/oil/bin/oil.py", line 803, in AppBundleMain status = ShellMain('osh', argv0, main_argv, login_shell) File "/home/andy/git/oilshell/oil/bin/oil.py", line 616, 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 162, in Batch is_control_flow, is_fatal = ex.ExecuteAndCatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1195, in ExecuteAndCatch status = self._Execute(node, fork_external=fork_external) File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1143, in _Execute status, check_errexit = self._Dispatch(node, fork_external) File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 661, in _Dispatch arg_vec = self.word_ev.EvalWordSequence2(words) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1122, in EvalWordSequence2 self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 910, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 839, in _EvalWordPart self._EvalDoubleQuotedPart(part, part_vals) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 523, in _EvalDoubleQuotedPart self._EvalWordPart(p, part_vals, quoted=True) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 874, in _EvalWordPart self._EvalBracedVarSub(part, part_vals, quoted) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 635, in _EvalBracedVarSub index = self.arith_ev.Eval(anode) File "/home/andy/git/oilshell/oil/osh/expr_eval.py", line 464, 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 852, in _cpython_main_hook main(sys.argv) File "/home/andy/git/oilshell/oil/bin/oil.py", line 833, in main sys.exit(AppBundleMain(argv)) File "/home/andy/git/oilshell/oil/bin/oil.py", line 803, in AppBundleMain status = ShellMain('osh', argv0, main_argv, login_shell) File "/home/andy/git/oilshell/oil/bin/oil.py", line 616, 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 168, in Batch return status File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1195, in ExecuteAndCatch status = self._Execute(node, fork_external=fork_external) File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1143, in _Execute status, check_errexit = self._Dispatch(node, fork_external) File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1084, in _Dispatch libc.print_time(real, user, sys_) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1122, in EvalWordSequence2 self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 910, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 839, in _EvalWordPart self._EvalDoubleQuotedPart(part, part_vals) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 523, in _EvalDoubleQuotedPart self._EvalWordPart(p, part_vals, quoted=True) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 874, in _EvalWordPart self._EvalBracedVarSub(part, part_vals, quoted) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 781, in _EvalBracedVarSub val = value.StrArray([]) File "/home/andy/git/oilshell/oil/osh/expr_eval.py", line 464, 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.0/_bin/osh' (1) Stripping the oil.ovm binary may cause this error. See https://github.com/oilshell/oil/issues/47 |
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 | 10 WTF index by key name [osh stdout] Expected u'bb dd\n', got '' [osh status] Expected 0, got 1 stdout: stderr: echo "${a[xx]}" "${a[cc]}" ^~ [ stdin ]:3: fatal: Undefined value in arithmetic context (0 if shopt -u strict-arith) |
osh_ALT | 10 WTF index by key name [osh_ALT stdout] Expected u'bb dd\n', got '' [osh_ALT status] Expected 0, got 1 stdout: stderr: echo "${a[xx]}" "${a[cc]}" ^~ [ stdin ]:3: fatal: Undefined value in arithmetic context (0 if shopt -u strict-arith) |
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: |
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: a['x']+='foo' ^ [ array LValue in (source.Stdin comment:'') ]:2: fatal: Invalid integer constant 'x' |
osh_ALT | 14 Append to associative array value [osh_ALT stdout] Expected "['foobar']\n", got '' [osh_ALT status] Expected 0, got 1 stdout: stderr: a['x']+='foo' ^ [ array LValue in (source.Stdin comment:'') ]:2: fatal: Invalid integer constant 'x' |
bash | 15 Slice of associative array doesn't make sense in bash stdout: ['2', '1', '5'] ['2', '1', '5'] ['1', '5', '4'] ['5', '4', '3'] ['4', '3'] ['3']stderr: |