Browse Source

test: set stdin too for pseudo-tty tests

Ref: https://github.com/nodejs/node/pull/10037
Ref: https://github.com/nodejs/node/pull/10146
PR-URL: https://github.com/nodejs/node/pull/10149
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
v6.x
Anna Henningsen 8 years ago
committed by Michaël Zasso
parent
commit
e057925316
  1. 4
      tools/test.py

4
tools/test.py

@ -683,11 +683,12 @@ def Execute(args, context, timeout=None, env={}, faketty=False):
if faketty:
import pty
(out_master, fd_out) = pty.openpty()
fd_err = fd_out
fd_in = fd_err = fd_out
pty_out = out_master
else:
(fd_out, outname) = tempfile.mkstemp()
(fd_err, errname) = tempfile.mkstemp()
fd_in = 0
pty_out = None
# Extend environment
@ -699,6 +700,7 @@ def Execute(args, context, timeout=None, env={}, faketty=False):
context,
timeout,
args = args,
stdin = fd_in,
stdout = fd_out,
stderr = fd_err,
env = env_copy,

Loading…
Cancel
Save