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 BUG 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, 5 known bugs, 10 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 '2 3\n', got ''

stdout:
stderr: 
osh warning: Expected string but got (StrArray strs:["'1'""'2'""'3'"])
Traceback (most recent call last):
  File "bin/osh", line 430, in <module>
    main(sys.argv)
  File "bin/osh", line 417, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 400, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 359, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1212, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1057, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 962, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1024, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1004, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 957, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 853, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 801, in _EvalWordPart
    return self._EvalBracedVarSub(part, quoted)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 681, in _EvalBracedVarSub
    index = arith_ev.Eval(anode)
  File "/home/andy/git/oil/bin/../core/expr_eval.py", line 129, in Eval
    return self._Eval(node)
  File "/home/andy/git/oil/bin/../core/expr_eval.py", line 234, in _Eval
    raise AssertionError("Shouldn't get here")
AssertionError: Shouldn't get here
osh1 Slicing of string with constants

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

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 430, in <module>
    main(sys.argv)
  File "bin/osh", line 417, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 400, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 359, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1212, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1057, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 962, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1024, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1004, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 957, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 853, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 801, in _EvalWordPart
    return self._EvalBracedVarSub(part, quoted)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 707, in _EvalBracedVarSub
    if 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 'abcd abcd b\n', got ''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 430, in <module>
    main(sys.argv)
  File "bin/osh", line 417, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 400, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 359, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1212, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1057, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 962, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1024, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1004, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 957, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 853, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 801, in _EvalWordPart
    return self._EvalBracedVarSub(part, quoted)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 707, in _EvalBracedVarSub
    if 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 '1 X 3\n', got '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

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

[osh stdout] Expected '1 X 3\n', got '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 '1 2 X\n', got '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 'abcd abcd b\n', got ''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 430, in <module>
    main(sys.argv)
  File "bin/osh", line 417, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 400, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 359, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1212, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1057, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 962, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1024, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1004, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 957, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 853, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 801, in _EvalWordPart
    return self._EvalBracedVarSub(part, quoted)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 707, in _EvalBracedVarSub
    if 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 u'2\nc\n', got ''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 430, in <module>
    main(sys.argv)
  File "bin/osh", line 417, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 400, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 359, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1212, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1057, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 962, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1024, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1004, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 957, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 853, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 811, in _EvalWordPart
    num = arith_ev.Eval(part.anode)
  File "/home/andy/git/oil/bin/../core/expr_eval.py", line 129, in Eval
    return self._Eval(node)
  File "/home/andy/git/oil/bin/../core/expr_eval.py", line 191, in _Eval
    lhs = self._Eval(node.cond)
  File "/home/andy/git/oil/bin/../core/expr_eval.py", line 234, in _Eval
    raise AssertionError("Shouldn't get here")
AssertionError: Shouldn't get here
osh8 Triple parens should be disambiguated

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

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 430, in <module>
    main(sys.argv)
  File "bin/osh", line 417, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 400, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 359, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1212, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1057, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1014, in _Execute
    i = arith_ev.Eval(node.child)
  File "/home/andy/git/oil/bin/../core/expr_eval.py", line 129, in Eval
    return self._Eval(node)
  File "/home/andy/git/oil/bin/../core/expr_eval.py", line 232, in _Eval
    raise NotImplementedError("Unhandled node %r" % node.__class__.__name__)
NotImplementedError: Unhandled node 'ArithAssign'
osh9 Quadruple parens should be disambiguated

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

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 430, in <module>
    main(sys.argv)
  File "bin/osh", line 417, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 400, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 359, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1212, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1057, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 1014, in _Execute
    i = arith_ev.Eval(node.child)
  File "/home/andy/git/oil/bin/../core/expr_eval.py", line 129, in Eval
    return self._Eval(node)
  File "/home/andy/git/oil/bin/../core/expr_eval.py", line 232, in _Eval
    raise NotImplementedError("Unhandled node %r" % node.__class__.__name__)
NotImplementedError: Unhandled node 'ArithAssign'
mksh10 Alternative $[] syntax

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