Results for here-doc.test.sh

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

143 passed, 2 ok, 3 known unimplemented, 1 known bugs, 3 failed, 2 skipped

Details on runs that didn't PASS

dash0 Here string

stdout:
stderr: 
/bin/dash: 1: Syntax error: redirection unexpected
dash1 Here string with $

stdout:
stderr: 
/bin/dash: 1: Syntax error: redirection unexpected
osh1 Here string with $

[osh stdout] Expected u'one\ntwo\n\n', got 'one\\ntwo\\n\n'

stdout:
one\ntwo\n
stderr:
osh_ALT1 Here string with $

[osh_ALT stdout] Expected u'one\ntwo\n\n', got 'one\\ntwo\\n\n'

stdout:
one\ntwo\n
stderr:
osh3 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 475, in <module>
    main(sys.argv)
  File "bin/osh", line 458, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 441, in OilMain
    status = OshMain(main_argv, login_shell)
  File "bin/osh", line 394, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 969, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 935, in _Execute
    self.fd_state.Pop()
  File "/home/andy/git/oilshell/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 475, in <module>
    main(sys.argv)
  File "bin/osh", line 458, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 441, in OilMain
    status = OshMain(main_argv, login_shell)
  File "bin/osh", line 394, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 969, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 933, in _Execute
    status, check_errexit = self._Dispatch(node, fork_external)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 743, in _Dispatch
    status = self._ExecuteList(node.children)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 962, in _ExecuteList
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 935, in _Execute
    self.fd_state.Pop()
  File "/home/andy/git/oilshell/oil/bin/../core/process.py", line 193, in Pop
    os.dup2(saved, orig)
OSError: [Errno 9] Bad file descriptor
osh_ALT3 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/oilshell/oil/Python-2.7.13/Lib/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/home/andy/git/oilshell/oil/Python-2.7.13/Lib/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 475, in <module>
    main(sys.argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 458, in main
    sys.exit(OilMain(argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 441, in OilMain
    status = OshMain(main_argv, login_shell)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 394, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 969, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 935, in _Execute
    self.fd_state.Pop()
  File "/home/andy/git/oil/bin/../core/process.py", line 193, in Pop
OSError: [Errno 9] Bad file descriptor
FATAL: couldn't import from app bundle '_bin/osh' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47
dup2(10, 8) error: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/Python-2.7.13/Lib/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/home/andy/git/oilshell/oil/Python-2.7.13/Lib/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 475, in <module>
    main(sys.argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 458, in main
    sys.exit(OilMain(argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 441, in OilMain
    status = OshMain(main_argv, login_shell)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 394, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 969, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 933, in _Execute
    status, check_errexit = self._Dispatch(node, fork_external)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 743, in _Dispatch
    status = self._ExecuteList(node.children)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 962, in _ExecuteList
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 935, in _Execute
    self.fd_state.Pop()
  File "/home/andy/git/oil/bin/../core/process.py", line 193, in Pop
OSError: [Errno 9] Bad file descriptor
FATAL: couldn't import from app bundle '_bin/osh' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47
osh5 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_ALT5 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
---
bash6 Here doc with bad comsub delimiter

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

stdout:
stderr: 
/bin/mksh: <stdin>[1]: syntax error: '(' unexpected
mksh15 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
dash29 Here doc within subshell with boolean

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