Results for command-sub.test.sh

casedashbashmkshoshdescription
0pass pass pass FAIL case
details
1pass pass pass FAIL case in subshell
details
2pass pass pass pass Command sub word part
3pass pass pass pass Backtick
4pass pass pass FAIL Backtick 2
details
5pass pass pass FAIL Nested backticks
details
6pass pass pass pass Making command out of command sub should work
7BUG pass ok FAIL Making keyword out of command sub should NOT work
detailsdetailsdetails
8pass pass pass pass Command sub with here doc
9pass pass pass pass Here doc with pipeline
10pass pass pass pass Command Sub word split

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

Details on runs that didn't PASS

osh0 case

[osh stdout] Expected b'letter\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 = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 937, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 828, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 912, in _Execute
    raise NotImplementedError
NotImplementedError
osh1 case in subshell

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

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 = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 937, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 716, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 962, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 945, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 906, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 799, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 625, in _EvalWordPart
    return [self._EvalCommandSub(part.command_list, quoted)]
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 980, in _EvalCommandSub
    status = p.Run()
  File "/home/andy/git/oil/bin/../core/process.py", line 482, in Run
    self.Start()
  File "/home/andy/git/oil/bin/../core/process.py", line 468, in Start
    self.thunk.RunInChild()
  File "/home/andy/git/oil/bin/../core/process.py", line 273, in RunInChild
    self.RunInParent()
  File "/home/andy/git/oil/bin/../core/process.py", line 328, in RunInParent
    return self.ex.Execute(self.node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 937, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 828, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 912, in _Execute
    raise NotImplementedError
NotImplementedError
osh4 Backtick 2

[osh stdout] Expected b'ls\n', got b'-n l -n s\n'

stdout:
-n l -n s
stderr:
osh5 Nested backticks

[osh stdout] Expected b'01-bad-func.sh\n', got b'-n s` tests\n'

stdout:
-n s` tests
stderr:
Unexpected error in execvpe('`echo', ['`echo', '-n', 'l'], ...): [Errno 2] No such file or directory: b'/home/andy/bin/`echo'
dash7 Making keyword out of command sub should NOT work

stdout:
stderr: 
/bin/dash: 1: for: not found
mksh7 Making keyword out of command sub should NOT work

stdout:
stderr: 
/bin/mksh: <stdin>[1]: syntax error: 'do' unexpected
osh7 Making keyword out of command sub should NOT work

[osh status] Expected 2, got 127

stdout:
stderr: 
Unexpected error in execvpe('for', ['for', 'i', 'in', 'a', 'b', 'c'], ...): [Errno 2] No such file or directory: b'/home/andy/bin/for'