Results for arith-context.test.sh

casebashmkshzshoshdescription
0pass pass N-I FAIL Multiple right brackets inside expression
detailsdetails
1pass pass pass FAIL Slicing of string with constants
details
2pass pass pass FAIL Slicing of string with variables
details
3pass pass ok FAIL Array index on LHS of assignment
detailsdetails
4pass pass FAIL FAIL Array index on LHS with spaces
detailsdetails
5pass pass ok FAIL Array index on LHS with indices
detailsdetails
6pass BUG BUG FAIL Slicing of string with expressions
detailsdetailsdetails
7pass BUG BUG FAIL Ambiguous colon in slice
detailsdetailsdetails
8pass pass pass FAIL Triple parens should be disambiguated
details
9pass pass pass FAIL Quadruple parens should be disambiguated
details
10pass N-I pass pass Alternative $[] syntax
details

25 passed, 2 ok, 2 known unimplemented, 4 known bugs, 11 failed, 0 skipped

Details on runs that didn't PASS

zsh0 Multiple right brackets inside expression

stdout:
stderr: 
osh0 Multiple right brackets inside expression

[osh stdout] Expected b'2 3\n', got b''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status, cflow = ex.Execute(node)
  File "/mnt/big/home/andy/git/oil/bin/../core/cmd_exec.py", line 758, in Execute
    status, cflow = self.Execute(child)  # last status wins
  File "/mnt/big/home/andy/git/oil/bin/../core/cmd_exec.py", line 663, in Execute
    raise AssertionError('Error evaluating words: %s' % err)
AssertionError: Error evaluating words: ['Error evaluating arith sub in index expression', 'Error evaluating word part (BracedVarSub\n  token: (token id:VSub_Name val:a span_id:12)\n  bracket_op: \n    (ArrayIndex\n      expr: \n        (ArithBinary\n          op_id: Arith_LBracket\n          left: (RightVar name:a)\n          right: \n            (ArithWord\n              w: (CompoundWord parts:[(LiteralPart token:(token id:Lit_Digits val:0 span_id:16))])\n            )\n        )\n    )\n  spids: [11 19]\n)', 'Error evaluating word (CompoundWord\n  parts: [\n    (BracedVarSub\n      token: (token id:VSub_Name val:a span_id:12)\n      bracket_op: \n        (ArrayIndex\n          expr: \n            (ArithBinary\n              op_id: Arith_LBracket\n              left: (RightVar name:a)\n              right: \n                (ArithWord\n                  w: \n                    (CompoundWord\n                      parts: [(LiteralPart token:(token id:Lit_Digits val:0 span_id:16))]\n                    )\n                )\n            )\n        )\n      spids: [11 19]\n    )\n  ]\n)']
osh1 Slicing of string with constants

[osh stdout] Expected b'abcd abcd b\n', got b''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status, cflow = ex.Execute(node)
  File "/mnt/big/home/andy/git/oil/bin/../core/cmd_exec.py", line 758, in Execute
    status, cflow = self.Execute(child)  # last status wins
  File "/mnt/big/home/andy/git/oil/bin/../core/cmd_exec.py", line 659, in Execute
    argv = self.ev.EvalWords(node.words)
  File "/mnt/big/home/andy/git/oil/bin/../core/word_eval.py", line 791, in EvalWords
    ok, val = self.EvalCompoundWord(w, ifs=ifs, do_glob=do_glob)
  File "/mnt/big/home/andy/git/oil/bin/../core/word_eval.py", line 580, in EvalCompoundWord
    ok, val = self.EvalWordPart(p, quoted=False)
  File "/mnt/big/home/andy/git/oil/bin/../core/word_eval.py", line 705, in EvalWordPart
    return self.EvalVarSub(part, quoted=quoted)
  File "/mnt/big/home/andy/git/oil/bin/../core/word_eval.py", line 414, in EvalVarSub
    if part.suffix_op and LookupKind(part.suffix_op.op_id) == Kind.VTest:
AttributeError: 'Slice' object has no attribute 'op_id'
osh2 Slicing of string with variables

[osh stdout] Expected b'abcd abcd b\n', got b''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status, cflow = ex.Execute(node)
  File "/mnt/big/home/andy/git/oil/bin/../core/cmd_exec.py", line 758, in Execute
    status, cflow = self.Execute(child)  # last status wins
  File "/mnt/big/home/andy/git/oil/bin/../core/cmd_exec.py", line 659, in Execute
    argv = self.ev.EvalWords(node.words)
  File "/mnt/big/home/andy/git/oil/bin/../core/word_eval.py", line 791, in EvalWords
    ok, val = self.EvalCompoundWord(w, ifs=ifs, do_glob=do_glob)
  File "/mnt/big/home/andy/git/oil/bin/../core/word_eval.py", line 580, in EvalCompoundWord
    ok, val = self.EvalWordPart(p, quoted=False)
  File "/mnt/big/home/andy/git/oil/bin/../core/word_eval.py", line 705, in EvalWordPart
    return self.EvalVarSub(part, quoted=quoted)
  File "/mnt/big/home/andy/git/oil/bin/../core/word_eval.py", line 414, in EvalVarSub
    if part.suffix_op and LookupKind(part.suffix_op.op_id) == Kind.VTest:
AttributeError: 'Slice' object has no attribute 'op_id'
zsh3 Array index on LHS of assignment

stdout:
X 2 3
stderr:
osh3 Array index on LHS of assignment

[osh stdout] Expected b'1 X 3\n', got b'1 2 3\n'

stdout:
1 2 3
stderr:
Unexpected error in execvpe('a[zero+5-4]=X', ['a[zero+5-4]=X'], ...): [Errno 2] No such file or directory
zsh4 Array index on LHS with spaces

[zsh stdout] Expected b'', got b'1 2 3\n'
[zsh status] Expected 1, got 0

stdout:
1 2 3
stderr:
zsh: bad pattern: a[zero
osh4 Array index on LHS with spaces

[osh stdout] Expected b'1 X 3\n', got b'1 2 3\n'

stdout:
1 2 3
stderr:
Unexpected error in execvpe('a[zero', ['a[zero', '+', '5', '-', '4]=X'], ...): [Errno 2] No such file or directory
zsh5 Array index on LHS with indices

stdout:
X 2 3
stderr:
osh5 Array index on LHS with indices

[osh stdout] Expected b'1 2 X\n', got b'1 2 3\n'

stdout:
1 2 3
stderr:
Unexpected error in execvpe('a[a[1]]=X', ['a[a[1]]=X'], ...): [Errno 2] No such file or directory
mksh6 Slicing of string with expressions

stdout:
stderr: 
/bin/mksh: <stdin>[3]: ${s:zero}: bad substitution
zsh6 Slicing of string with expressions

stdout:
stderr: 
zsh: unrecognized modifier `z'
osh6 Slicing of string with expressions

[osh stdout] Expected b'abcd abcd b\n', got b''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status, cflow = ex.Execute(node)
  File "/mnt/big/home/andy/git/oil/bin/../core/cmd_exec.py", line 758, in Execute
    status, cflow = self.Execute(child)  # last status wins
  File "/mnt/big/home/andy/git/oil/bin/../core/cmd_exec.py", line 659, in Execute
    argv = self.ev.EvalWords(node.words)
  File "/mnt/big/home/andy/git/oil/bin/../core/word_eval.py", line 791, in EvalWords
    ok, val = self.EvalCompoundWord(w, ifs=ifs, do_glob=do_glob)
  File "/mnt/big/home/andy/git/oil/bin/../core/word_eval.py", line 580, in EvalCompoundWord
    ok, val = self.EvalWordPart(p, quoted=False)
  File "/mnt/big/home/andy/git/oil/bin/../core/word_eval.py", line 705, in EvalWordPart
    return self.EvalVarSub(part, quoted=quoted)
  File "/mnt/big/home/andy/git/oil/bin/../core/word_eval.py", line 414, in EvalVarSub
    if part.suffix_op and LookupKind(part.suffix_op.op_id) == Kind.VTest:
AttributeError: 'Slice' object has no attribute 'op_id'
mksh7 Ambiguous colon in slice

stdout:
2
stderr:
/bin/mksh: <stdin>[3]: ${s: 0 < 1 ? 2 : 0 : 1}: bad substitution
zsh7 Ambiguous colon in slice

stdout:
2
stderr:
zsh: ':' expected
osh7 Ambiguous colon in slice

[osh stdout] Expected b'2\nc\n', got b''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status, cflow = ex.Execute(node)
  File "/mnt/big/home/andy/git/oil/bin/../core/cmd_exec.py", line 758, in Execute
    status, cflow = self.Execute(child)  # last status wins
  File "/mnt/big/home/andy/git/oil/bin/../core/cmd_exec.py", line 659, in Execute
    argv = self.ev.EvalWords(node.words)
  File "/mnt/big/home/andy/git/oil/bin/../core/word_eval.py", line 791, in EvalWords
    ok, val = self.EvalCompoundWord(w, ifs=ifs, do_glob=do_glob)
  File "/mnt/big/home/andy/git/oil/bin/../core/word_eval.py", line 580, in EvalCompoundWord
    ok, val = self.EvalWordPart(p, quoted=False)
  File "/mnt/big/home/andy/git/oil/bin/../core/word_eval.py", line 713, in EvalWordPart
    return self.EvalArithSub(part.anode)
  File "/mnt/big/home/andy/git/oil/bin/../core/word_eval.py", line 228, in EvalArithSub
    if arith_ev.Eval(anode):
  File "/mnt/big/home/andy/git/oil/bin/../core/expr_eval.py", line 64, in Eval
    result = self._Eval(node)
  File "/mnt/big/home/andy/git/oil/bin/../core/expr_eval.py", line 202, in _Eval
    lhs = self._Eval(node.cond)
  File "/mnt/big/home/andy/git/oil/bin/../core/expr_eval.py", line 239, in _Eval
    raise AssertionError("Shouldn't get here")
AssertionError: Shouldn't get here
osh8 Triple parens should be disambiguated

[osh stdout] Expected b'7 7\n', got b''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status, cflow = ex.Execute(node)
  File "/mnt/big/home/andy/git/oil/bin/../core/cmd_exec.py", line 758, in Execute
    status, cflow = self.Execute(child)  # last status wins
  File "/mnt/big/home/andy/git/oil/bin/../core/cmd_exec.py", line 723, in Execute
    ok = arith_ev.Eval(node.child)
  File "/mnt/big/home/andy/git/oil/bin/../core/expr_eval.py", line 64, in Eval
    result = self._Eval(node)
  File "/mnt/big/home/andy/git/oil/bin/../core/expr_eval.py", line 237, in _Eval
    raise AssertionError("Invalid node %r" % node.id)
AttributeError: 'ArithAssign' object has no attribute 'id'
osh9 Quadruple parens should be disambiguated

[osh stdout] Expected b'15 15\n', got b''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status, cflow = ex.Execute(node)
  File "/mnt/big/home/andy/git/oil/bin/../core/cmd_exec.py", line 758, in Execute
    status, cflow = self.Execute(child)  # last status wins
  File "/mnt/big/home/andy/git/oil/bin/../core/cmd_exec.py", line 723, in Execute
    ok = arith_ev.Eval(node.child)
  File "/mnt/big/home/andy/git/oil/bin/../core/expr_eval.py", line 64, in Eval
    result = self._Eval(node)
  File "/mnt/big/home/andy/git/oil/bin/../core/expr_eval.py", line 237, in _Eval
    raise AssertionError("Invalid node %r" % node.id)
AttributeError: 'ArithAssign' object has no attribute 'id'
mksh10 Alternative $[] syntax

stdout:
$[1 + 2] $[3 * 4]
stderr: