aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAnthony Pesch <inolen@gmail.com>2013-08-27 23:43:56 -0700
committerAnthony Pesch <inolen@gmail.com>2013-08-29 12:57:33 -0700
commitfe3533636b24c23fb904f3ca94425003c0565177 (patch)
tree23ab00295c6a18f00c01690c50de9f53649d6e84 /tools
parent4d41dc3fa572f89249749c4b7a37864c99018004 (diff)
- added tests for tcgetattr / tcsetattr
- made test_stdin async to work in the node environment - clearerr should reset both eof and error indicators - fgetc was incorrectly setting the eof indicator. in cases where fread had errored with EAGAIN it was setting eof. I removed the set entirely, as there is no need for fgetc to even worry about it, fread will set the correct value in any case
Diffstat (limited to 'tools')
-rw-r--r--tools/jsrun.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/jsrun.py b/tools/jsrun.py
index 571e9cee..91038f6e 100644
--- a/tools/jsrun.py
+++ b/tools/jsrun.py
@@ -12,13 +12,14 @@ def timeout_run(proc, timeout, note='unnamed process', full_output=False):
out = proc.communicate()
return '\n'.join(out) if full_output else out[0]
-def run_js(filename, engine=None, args=[], check_timeout=False, stdout=PIPE, stderr=None, cwd=None, full_output=False):
+def run_js(filename, engine=None, args=[], check_timeout=False, stdin=None, stdout=PIPE, stderr=None, cwd=None, full_output=False):
if type(engine) is not list:
engine = [engine]
command = engine + [filename] + (['--'] if 'd8' in engine[0] or 'jsc' in engine[0] else []) + args
return timeout_run(
Popen(
command,
+ stdin=stdin,
stdout=stdout,
stderr=stderr,
cwd=cwd),