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>'
  <no position info for token>
Error parsing AndOr in ParseCommandTerm
---
dash4 Pattern replacement

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

[osh stdout] Expected 'abXX\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: 'PatSub' object has no attribute 'op_id'
dash5 String slice

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

[osh stdout] Expected 'bcd\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'
dash6 Negative string slice

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

[osh stdout] Expected 'def\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'
dash7 String slice with math

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

[osh stdout] Expected 'def\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'