spec test index / oilshell.org
171 passed, 13 ok, 8 known unimplemented, 8 known bugs, 8 failed, 0 skipped
bash | 6 nounset with empty array (design bug, makes it hard to use arrays) stdout: stderr: /bin/bash: line 3: empty[@]: unbound variable |
mksh | 6 nounset with empty array (design bug, makes it hard to use arrays) stdout: stderr: /bin/mksh: <stdin>[3]: empty[@]: parameter not set |
mksh | 7 local array stdout: stderr: /bin/mksh: <stdin>[2]: syntax error: '(' unexpected |
mksh | 9 space before ( in array initialization stdout: 1stderr: |
mksh | 11 array with invalid token stdout: stderr: /bin/mksh: <stdin>[3]: syntax error: '&' unexpected |
mksh | 15 Negative index stdout: ['', '', '']stderr: |
osh | 19 Retrieve all indices with ! [osh stdout] Expected "['0', '1']\n", got '' [osh status] Expected 0, got 1 stdout: stderr: Traceback (most recent call last): File "bin/osh", line 504, in <module> main(sys.argv) File "bin/osh", line 487, in main sys.exit(OilMain(argv)) File "bin/osh", line 470, in OilMain status = OshMain(main_argv, login_shell) File "bin/osh", line 409, in OshMain status = ex.ExecuteAndRunExitTrap(node) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1210, in ExecuteAndRunExitTrap status = self.Execute(node) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1192, in Execute status = self._Execute(node, fork_external=fork_external) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1145, in _Execute status, check_errexit = self._Dispatch(node, fork_external) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 882, in _Dispatch status = self._ExecuteList(node.children) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1166, in _ExecuteList status = self._Execute(child) # last status wins File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1145, in _Execute status, check_errexit = self._Dispatch(node, fork_external) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 668, in _Dispatch argv = self.word_ev.EvalWordSequence(words) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 909, in EvalWordSequence return self._EvalWordSequence(words) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 882, in _EvalWordSequence self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 709, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 646, in _EvalWordPart self._EvalDoubleQuotedPart(part, part_vals) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 373, in _EvalDoubleQuotedPart self._EvalWordPart(p, part_vals, quoted=True) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 681, in _EvalWordPart self._EvalBracedVarSub(part, part_vals, quoted) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 493, in _EvalBracedVarSub val = self._ApplyPrefixOp(val, part.prefix_op) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 319, in _ApplyPrefixOp return self.mem.GetVar(val.s) AttributeError: 'StrArray' object has no attribute 's' |
osh_ALT | 19 Retrieve all indices with ! [osh_ALT stdout] Expected "['0', '1']\n", got '' [osh_ALT status] Expected 0, got 1 stdout: stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/Python-2.7.13/Lib/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/home/andy/git/oilshell/oil/Python-2.7.13/Lib/runpy.py", line 72, in _run_code exec code in run_globals File "/home/andy/git/oilshell/oil/bin/oil.py", line 504, in <module> main(sys.argv) File "/home/andy/git/oilshell/oil/bin/oil.py", line 487, in main sys.exit(OilMain(argv)) File "/home/andy/git/oilshell/oil/bin/oil.py", line 470, in OilMain status = OshMain(main_argv, login_shell) File "/home/andy/git/oilshell/oil/bin/oil.py", line 409, in OshMain status = ex.ExecuteAndRunExitTrap(node) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1210, in ExecuteAndRunExitTrap status = self.Execute(node) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1192, in Execute status = self._Execute(node, fork_external=fork_external) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1145, in _Execute status, check_errexit = self._Dispatch(node, fork_external) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 882, in _Dispatch status = self._ExecuteList(node.children) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1166, in _ExecuteList status = self._Execute(child) # last status wins File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1145, in _Execute status, check_errexit = self._Dispatch(node, fork_external) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 668, in _Dispatch argv = self.word_ev.EvalWordSequence(words) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 909, in EvalWordSequence return self._EvalWordSequence(words) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 882, in _EvalWordSequence self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 709, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 646, in _EvalWordPart self._EvalDoubleQuotedPart(part, part_vals) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 373, in _EvalDoubleQuotedPart self._EvalWordPart(p, part_vals, quoted=True) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 681, in _EvalWordPart self._EvalBracedVarSub(part, part_vals, quoted) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 493, in _EvalBracedVarSub val = self._ApplyPrefixOp(val, part.prefix_op) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 319, in _ApplyPrefixOp return self.mem.GetVar(val.s) AttributeError: 'StrArray' object has no attribute 's' FATAL: couldn't import from app bundle '_bin/osh' (1) Stripping the oil.ovm binary may cause this error. See https://github.com/oilshell/oil/issues/47 |
mksh | 20 ${!a[1]} is named ref in bash stdout: ['a[1]']stderr: |
mksh | 21 Retrieve indices without [] stdout: ['a']stderr: |
osh | 21 Retrieve indices without [] [osh stdout] Expected "['']\n", got '' [osh status] Expected 0, got 1 stdout: stderr: Traceback (most recent call last): File "bin/osh", line 504, in <module> main(sys.argv) File "bin/osh", line 487, in main sys.exit(OilMain(argv)) File "bin/osh", line 470, in OilMain status = OshMain(main_argv, login_shell) File "bin/osh", line 409, in OshMain status = ex.ExecuteAndRunExitTrap(node) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1210, in ExecuteAndRunExitTrap status = self.Execute(node) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1192, in Execute status = self._Execute(node, fork_external=fork_external) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1145, in _Execute status, check_errexit = self._Dispatch(node, fork_external) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 882, in _Dispatch status = self._ExecuteList(node.children) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1166, in _ExecuteList status = self._Execute(child) # last status wins File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1145, in _Execute status, check_errexit = self._Dispatch(node, fork_external) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 668, in _Dispatch argv = self.word_ev.EvalWordSequence(words) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 909, in EvalWordSequence return self._EvalWordSequence(words) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 882, in _EvalWordSequence self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 709, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 646, in _EvalWordPart self._EvalDoubleQuotedPart(part, part_vals) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 373, in _EvalDoubleQuotedPart self._EvalWordPart(p, part_vals, quoted=True) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 681, in _EvalWordPart self._EvalBracedVarSub(part, part_vals, quoted) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 493, in _EvalBracedVarSub val = self._ApplyPrefixOp(val, part.prefix_op) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 319, in _ApplyPrefixOp return self.mem.GetVar(val.s) AttributeError: 'StrArray' object has no attribute 's' |
osh_ALT | 21 Retrieve indices without [] [osh_ALT stdout] Expected "['']\n", got '' [osh_ALT status] Expected 0, got 1 stdout: stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/Python-2.7.13/Lib/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/home/andy/git/oilshell/oil/Python-2.7.13/Lib/runpy.py", line 72, in _run_code exec code in run_globals File "/home/andy/git/oilshell/oil/bin/oil.py", line 504, in <module> main(sys.argv) File "/home/andy/git/oilshell/oil/bin/oil.py", line 487, in main sys.exit(OilMain(argv)) File "/home/andy/git/oilshell/oil/bin/oil.py", line 470, in OilMain status = OshMain(main_argv, login_shell) File "/home/andy/git/oilshell/oil/bin/oil.py", line 409, in OshMain status = ex.ExecuteAndRunExitTrap(node) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1210, in ExecuteAndRunExitTrap status = self.Execute(node) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1192, in Execute status = self._Execute(node, fork_external=fork_external) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1145, in _Execute status, check_errexit = self._Dispatch(node, fork_external) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 882, in _Dispatch status = self._ExecuteList(node.children) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1166, in _ExecuteList status = self._Execute(child) # last status wins File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1145, in _Execute status, check_errexit = self._Dispatch(node, fork_external) File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 668, in _Dispatch argv = self.word_ev.EvalWordSequence(words) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 909, in EvalWordSequence return self._EvalWordSequence(words) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 882, in _EvalWordSequence self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 709, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 646, in _EvalWordPart self._EvalDoubleQuotedPart(part, part_vals) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 373, in _EvalDoubleQuotedPart self._EvalWordPart(p, part_vals, quoted=True) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 681, in _EvalWordPart self._EvalBracedVarSub(part, part_vals, quoted) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 493, in _EvalBracedVarSub val = self._ApplyPrefixOp(val, part.prefix_op) File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 319, in _ApplyPrefixOp return self.mem.GetVar(val.s) AttributeError: 'StrArray' object has no attribute 's' FATAL: couldn't import from app bundle '_bin/osh' (1) Stripping the oil.ovm binary may cause this error. See https://github.com/oilshell/oil/issues/47 |
mksh | 27 Exporting array doesn't do anything, not even first element stdout: stderr: /bin/mksh: <stdin>[1]: syntax error: '(' unexpected |
osh | 27 Exporting array doesn't do anything, not even first element stdout: stderr: Line 2 of '<stdin>' export PYTHONPATH=(a b c) ^~~~~~~~~~~ Unexpected array literal: (CompoundWord parts: [ (ArrayLiteralPart words: [ (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:a span_id:4))]) (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:b span_id:6))]) (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:c span_id:8))]) ] ) ] ) --- *** Error has no source location info *** Error parsing AndOr in ParseCommandTerm --- |
osh_ALT | 27 Exporting array doesn't do anything, not even first element stdout: stderr: Line 2 of '<stdin>' export PYTHONPATH=(a b c) ^~~~~~~~~~~ Unexpected array literal: (CompoundWord parts: [ (ArrayLiteralPart words: [ (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:a span_id:4))]) (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:b span_id:6))]) (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:c span_id:8))]) ] ) ] ) --- *** Error has no source location info *** Error parsing AndOr in ParseCommandTerm --- |
mksh | 28 Env with array stdout: stderr: /bin/mksh: <stdin>[1]: syntax error: '(' unexpected |
osh | 28 Env with array [osh stdout] Expected u'a\n(b b)\n', got '' [osh status] Expected 0, got 2 stdout: stderr: Line 2 of '<stdin>' A=a B=(b b) printenv.py A B ^ Unexpected array literal in binding: (CompoundWord parts: [ (ArrayLiteralPart words: [ (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:b span_id:5))]) (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:b span_id:7))]) ] ) ] ) --- *** Error has no source location info *** Error parsing AndOr in ParseCommandTerm --- |
osh_ALT | 28 Env with array [osh_ALT stdout] Expected u'a\n(b b)\n', got '' [osh_ALT status] Expected 0, got 2 stdout: stderr: Line 2 of '<stdin>' A=a B=(b b) printenv.py A B ^ Unexpected array literal in binding: (CompoundWord parts: [ (ArrayLiteralPart words: [ (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:b span_id:5))]) (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:b span_id:7))]) ] ) ] ) --- *** Error has no source location info *** Error parsing AndOr in ParseCommandTerm --- |
osh | 29 Set element [osh stdout] Expected "['9', '2 3']\n", got "['1', '2 3']\n" stdout: ['1', '2 3']stderr: Unexpected error in execvpe('a[0]=9', ['a[0]=9'], ...): [Errno 2] No such file or directory |
osh_ALT | 29 Set element [osh_ALT stdout] Expected "['9', '2 3']\n", got "['1', '2 3']\n" stdout: ['1', '2 3']stderr: Unexpected error in execvpe('a[0]=9', ['a[0]=9'], ...): [Errno 2] No such file or directory |
osh | 30 Set element with var ref [osh stdout] Expected "['9', '2 3']\n", got "['1', '2 3']\n" stdout: ['1', '2 3']stderr: Unexpected error in execvpe('a[0]=9', ['a[0]=9'], ...): [Errno 2] No such file or directory |
osh_ALT | 30 Set element with var ref [osh_ALT stdout] Expected "['9', '2 3']\n", got "['1', '2 3']\n" stdout: ['1', '2 3']stderr: Unexpected error in execvpe('a[0]=9', ['a[0]=9'], ...): [Errno 2] No such file or directory |
osh | 31 Set element with array ref [osh stdout] Expected "['1', '9']\n", got "['1', '2 3']\n" stdout: ['1', '2 3']stderr: Unexpected error in execvpe('a[1]=9', ['a[1]=9'], ...): [Errno 2] No such file or directory |
osh_ALT | 31 Set element with array ref [osh_ALT stdout] Expected "['1', '9']\n", got "['1', '2 3']\n" stdout: ['1', '2 3']stderr: Unexpected error in execvpe('a[1]=9', ['a[1]=9'], ...): [Errno 2] No such file or directory |
mksh | 32 Set array item to array stdout: stderr: /bin/mksh: <stdin>[2]: set: a[0]: is not an identifier |
osh | 32 Set array item to array [osh stdout] Expected 'status=1\n', got '' [osh status] Expected 0, got 2 stdout: stderr: Line 3 of '<stdin>' a[0]=(3 4) ^ Expected word type Right_FuncDef, got (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:3 span_id:13))]) --- *** Error has no source location info *** Error parsing AndOr in ParseCommandTerm --- |
osh_ALT | 32 Set array item to array [osh_ALT stdout] Expected 'status=1\n', got '' [osh_ALT status] Expected 0, got 2 stdout: stderr: Line 3 of '<stdin>' a[0]=(3 4) ^ Expected word type Right_FuncDef, got (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:3 span_id:13))]) --- *** Error has no source location info *** Error parsing AndOr in ParseCommandTerm --- |
mksh | 33 Slice of array with [@] stdout: stderr: /bin/mksh: <stdin>[2]: ${a[@]: 1:2}: bad substitution |
mksh | 34 Negative slice stdout: stderr: /bin/mksh: <stdin>[2]: ${a[@]: (-2):1}: bad substitution |
mksh | 35 Slice with arithmetic stdout: stderr: /bin/mksh: <stdin>[3]: ${a[@]:i-4:2}: bad substitution |
mksh | 41 Array syntax in wrong place stdout: stderr: /bin/mksh: <stdin>[1]: syntax error: '(' unexpected |
bash | 42 Single array with :- stdout: ['none', 'x', '']stderr: |
mksh | 42 Single array with :- stdout: ['none', 'x', 'none']stderr: |
osh | 42 Single array with :- stdout: ['x', '']stderr: |
osh_ALT | 42 Single array with :- stdout: ['x', '']stderr: |
mksh | 43 Stripping a whole array unquoted stdout: stderr: /bin/mksh: <stdin>[2]: ${files[@]%.c}: bad substitution |
mksh | 44 Stripping a whole array quoted stdout: stderr: /bin/mksh: <stdin>[2]: ${files[@]%.c}: bad substitution |
bash | 45 Multiple subscripts not allowed stdout: ['123', '123']stderr: |
mksh | 45 Multiple subscripts not allowed stdout: stderr: /bin/mksh: <stdin>[2]: ${a[0][0]}: bad substitution |
bash | 46 Length op, index op, then transform op is not allowed stdout: 3 3stderr: |
mksh | 46 Length op, index op, then transform op is not allowed stdout: stderr: /bin/mksh: <stdin>[2]: ${#a[0]/1/xxx}: bad substitution |
bash | 47 Array subscript not allowed on string stdout: abcstderr: |
mksh | 47 Array subscript not allowed on string stdout: abcstderr: |
osh | 52 Singleton Array Copy and Assign [osh stdout] Expected '4 4 4 4\n1 1 1 1\n', got '' [osh status] Expected 0, got 1 stdout: stderr: *** Error has no source location info *** osh failed: Can't index string 'c' with integer |
osh_ALT | 52 Singleton Array Copy and Assign [osh_ALT stdout] Expected '4 4 4 4\n1 1 1 1\n', got '' [osh_ALT status] Expected 0, got 1 stdout: stderr: *** Error has no source location info *** osh failed: Can't index string 'c' with integer |