Results for here-doc.test.sh

casedashbashmkshoshosh_ALTdescription
0pass pass pass pass pass Here redirect with explicit descriptor
1pass pass pass FAIL FAIL Here doc from another input file descriptor
detailsdetails
2pass pass pass pass pass Multiple here docs with different descriptors
3pass pass pass FAIL FAIL Here doc with bad var delimiter
detailsdetails
4pass BUG ok pass pass Here doc with bad comsub delimiter
detailsdetails
5pass pass pass pass pass Here doc and < redirect -- last one wins
6pass pass pass pass pass < redirect and here doc -- last one wins
7pass pass pass pass pass Here doc with var sub, command sub, arith sub
8pass pass pass pass pass Here doc in middle. And redirects in the middle.
9pass pass pass pass pass Here doc line continuation
10pass pass pass pass pass Here doc with quote expansion in terminator
11pass pass pass pass pass Here doc with multiline double quoted string
12pass pass pass pass pass Two here docs -- first is ignored; second ones wins!
13pass pass ok pass pass Here doc with line continuation, then pipe. Syntax error.
details
14pass pass pass pass pass Here doc with pipe on first line
15pass pass pass pass pass Here doc with pipe continued on last line
16pass pass pass pass pass Here doc with builtin 'read'
17pass pass pass pass pass Compound command here doc
18pass pass pass pass pass Here doc in while condition and here doc in body
19pass pass pass pass pass Here doc in while condition and here doc in body on multiple lines
20pass pass pass pass pass Here doc in while loop split up more
21pass pass pass pass pass Mixing << and <<-
22pass pass pass pass pass Two compound commands with two here docs
23pass pass pass pass pass Function def and execution with here doc
24pass pass pass pass pass Here doc as command prefix
25pass pass pass pass pass Redirect after here doc
26pass pass pass pass pass here doc stripping tabs
27N-I pass pass pass pass Here doc within subshell with boolean
details

132 passed, 2 ok, 1 known unimplemented, 1 known bugs, 2 failed, 2 skipped

Details on runs that didn't PASS

osh1 Here doc from another input file descriptor

[osh status] Expected 0, got 1

stdout:
8: here doc on descriptor
stderr:
dup2(10, 8) error: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "bin/osh", line 448, in <module>
    main(sys.argv)
  File "bin/osh", line 435, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 418, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 379, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 951, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 917, in _Execute
    self.fd_state.Pop()
  File "/home/andy/git/oil/bin/../core/process.py", line 193, in Pop
    os.dup2(saved, orig)
OSError: [Errno 9] Bad file descriptor
dup2(10, 8) error: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "bin/osh", line 448, in <module>
    main(sys.argv)
  File "bin/osh", line 435, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 418, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 379, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 951, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 915, in _Execute
    status, check_errexit = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 725, in _Dispatch
    status = self._ExecuteList(node.children)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 944, in _ExecuteList
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 917, in _Execute
    self.fd_state.Pop()
  File "/home/andy/git/oil/bin/../core/process.py", line 193, in Pop
    os.dup2(saved, orig)
OSError: [Errno 9] Bad file descriptor
osh_ALT1 Here doc from another input file descriptor

[osh_ALT status] Expected 0, got 1

stdout:
8: here doc on descriptor
stderr:
dup2(10, 8) error: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "/home/andy/git/oil/Python-2.7.13/Lib/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/home/andy/git/oil/Python-2.7.13/Lib/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/andy/git/oil/bin/oil.py", line 448, in <module>
    main(sys.argv)
  File "/home/andy/git/oil/bin/oil.py", line 435, in main
    sys.exit(OilMain(argv))
  File "/home/andy/git/oil/bin/oil.py", line 418, in OilMain
    status = OshMain(main_argv)
  File "/home/andy/git/oil/bin/oil.py", line 379, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 951, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 917, in _Execute
    self.fd_state.Pop()
  File "/home/andy/git/oil/bin/../core/process.py", line 193, in Pop
    os.dup2(saved, orig)
OSError: [Errno 9] Bad file descriptor
dup2(10, 8) error: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "/home/andy/git/oil/Python-2.7.13/Lib/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/home/andy/git/oil/Python-2.7.13/Lib/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/andy/git/oil/bin/oil.py", line 448, in <module>
    main(sys.argv)
  File "/home/andy/git/oil/bin/oil.py", line 435, in main
    sys.exit(OilMain(argv))
  File "/home/andy/git/oil/bin/oil.py", line 418, in OilMain
    status = OshMain(main_argv)
  File "/home/andy/git/oil/bin/oil.py", line 379, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 951, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 915, in _Execute
    status, check_errexit = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 725, in _Dispatch
    status = self._ExecuteList(node.children)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 944, in _ExecuteList
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 917, in _Execute
    self.fd_state.Pop()
  File "/home/andy/git/oil/bin/../core/process.py", line 193, in Pop
    os.dup2(saved, orig)
OSError: [Errno 9] Bad file descriptor
osh3 Here doc with bad var delimiter

[osh stdout] Expected 'here\n', got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
Line 1 of '<stdin>'
  cat <<${a}
        ^~
Error evaluating here doc delimiter: (CompoundWord parts:[(BracedVarSub token:(token id:VSub_Name val:a span_id:4) spids:[35])])
---
Line 0 of '<unknown>'
  <no position info for token>
Error parsing AndOr in ParseCommandTerm
---
osh_ALT3 Here doc with bad var delimiter

[osh_ALT stdout] Expected 'here\n', got ''
[osh_ALT status] Expected 0, got 2

stdout:
stderr: 
Line 1 of '<stdin>'
  cat <<${a}
        ^~
Error evaluating here doc delimiter: (CompoundWord parts:[(BracedVarSub token:(token id:VSub_Name val:a span_id:4) spids:[35])])
---
Line 0 of '<unknown>'
  <no position info for token>
Error parsing AndOr in ParseCommandTerm
---
bash4 Here doc with bad comsub delimiter

stdout:
here
stderr:
mksh4 Here doc with bad comsub delimiter

stdout:
stderr: 
/bin/mksh: <stdin>[1]: syntax error: '(' unexpected
mksh13 Here doc with line continuation, then pipe. Syntax error.

stdout:
stderr: 
/bin/mksh: <stdin>[5]: cat: 1: No such file or directory
/bin/mksh: <stdin>[6]: syntax error: '|' unexpected
dash27 Here doc within subshell with boolean

stdout:
127
stderr:
/bin/dash: 1: [[: not found