Results for var-op-other.test.sh

casedashbashmkshoshdescription
0pass pass pass pass String length
1pass pass pass pass Length of undefined variable
2ok pass pass pass Length of undefined variable with nounset
details
3N-I pass pass FAIL Cannot take length of substring slice
detailsdetails
4N-I pass pass FAIL Pattern replacement
detailsdetails
5N-I pass pass FAIL String slice
detailsdetails
6N-I pass pass FAIL Negative string slice
detailsdetails
7N-I pass pass FAIL String slice with math
detailsdetails

21 passed, 1 ok, 5 known unimplemented, 0 known bugs, 5 failed, 0 skipped

Details on runs that didn't PASS

dash2 Length of undefined variable with nounset

stdout:
stderr: 
/bin/dash: 2: undef: parameter not set
dash3 Cannot take length of substring slice

stdout:
5
stderr:
osh3 Cannot take length of substring slice

[osh status] Expected 1, got 2

stdout:
stderr: 
Line 2 of '<stdin>'
  echo ${#v:1:3}
           ^
Expected } after length expression, got (token id:VOp2_Colon val:":" span_id:8)
---
Line 2 of '<stdin>'
  echo ${#v:1:3}
           ^
Error reading command word
---
Line 0 of '<unknown>'
  <token had no position info>
NO COL
Error parsing AndOr in ParseCommandTerm
---
dash4 Pattern replacement

stdout:
stderr: 
/bin/dash: 2: Bad substitution
osh4 Pattern replacement

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

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 388, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 378, in main
    return OshMain(main_argv)
  File "bin/osh", line 337, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 1111, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 974, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 869, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 1056, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 1039, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 992, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 885, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 829, in _EvalWordPart
    return self._EvalBracedVarSub(part, quoted)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 733, in _EvalBracedVarSub
    if LookupKind(part.suffix_op.op_id) == Kind.VTest:
AttributeError: 'PatSub' object has no attribute 'op_id'
dash5 String slice

stdout:
stderr: 
/bin/dash: 2: Bad substitution
osh5 String slice

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

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 388, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 378, in main
    return OshMain(main_argv)
  File "bin/osh", line 337, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 1111, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 974, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 869, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 1056, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 1039, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 992, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 885, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 829, in _EvalWordPart
    return self._EvalBracedVarSub(part, quoted)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 733, in _EvalBracedVarSub
    if LookupKind(part.suffix_op.op_id) == Kind.VTest:
AttributeError: 'Slice' object has no attribute 'op_id'
dash6 Negative string slice

stdout:
stderr: 
/bin/dash: 2: Bad substitution
osh6 Negative string slice

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

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 388, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 378, in main
    return OshMain(main_argv)
  File "bin/osh", line 337, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 1111, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 974, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 869, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 1056, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 1039, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 992, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 885, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 829, in _EvalWordPart
    return self._EvalBracedVarSub(part, quoted)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 733, in _EvalBracedVarSub
    if LookupKind(part.suffix_op.op_id) == Kind.VTest:
AttributeError: 'Slice' object has no attribute 'op_id'
dash7 String slice with math

stdout:
stderr: 
/bin/dash: 3: Bad substitution
osh7 String slice with math

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

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 388, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 378, in main
    return OshMain(main_argv)
  File "bin/osh", line 337, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 1111, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 974, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 869, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 1056, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 1039, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 992, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 885, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 829, in _EvalWordPart
    return self._EvalBracedVarSub(part, quoted)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 733, in _EvalBracedVarSub
    if LookupKind(part.suffix_op.op_id) == Kind.VTest:
AttributeError: 'Slice' object has no attribute 'op_id'