diff options
author | Anthony Pesch <inolen@gmail.com> | 2013-07-14 15:12:49 -0700 |
---|---|---|
committer | Anthony Pesch <inolen@gmail.com> | 2013-07-14 15:12:49 -0700 |
commit | 739c8dade7eaed3e2fe26cbeb26f051185735500 (patch) | |
tree | 643f1574d4dd2c7e36c54f47542eae99292595be /tests/runner.py | |
parent | 65e8abdfabce0c3e6f5f4bef1479bd67bb3d28ad (diff) |
- moved std stream isTerminal property to object so all streams can see
- made ttyname use isatty to check if fd is tty
- hardcoded /dev/tty as tty name is ttyname_r
- fixed and changed isatty and ttyname tests to run natively
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/tests/runner.py b/tests/runner.py index b21eee08..69006184 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -7309,18 +7309,8 @@ def process(filename): self.do_run(src, expected, extra_emscripten_args=['-H', 'libc/unistd.h']) def test_unistd_ttyname(self): - add_pre_run = ''' -def process(filename): - import tools.shared as shared - src = open(filename, 'r').read().replace( - '// {{PRE_RUN_ADDITIONS}}', - open(shared.path_from_root('tests', 'unistd', 'ttyname.js'), 'r').read() - ) - open(filename, 'w').write(src) -''' src = open(path_from_root('tests', 'unistd', 'ttyname.c'), 'r').read() - expected = open(path_from_root('tests', 'unistd', 'ttyname.out'), 'r').read() - self.do_run(src, expected, post_build=add_pre_run) + self.do_run(src, 'success', force_c=True) def test_unistd_dup(self): src = open(path_from_root('tests', 'unistd', 'dup.c'), 'r').read() @@ -7352,18 +7342,8 @@ def process(filename): self.do_run(src, expected) def test_unistd_isatty(self): - add_pre_run = ''' -def process(filename): - import tools.shared as shared - src = open(filename, 'r').read().replace( - '// {{PRE_RUN_ADDITIONS}}', - open(shared.path_from_root('tests', 'unistd', 'isatty.js'), 'r').read() - ) - open(filename, 'w').write(src) -''' src = open(path_from_root('tests', 'unistd', 'isatty.c'), 'r').read() - expected = open(path_from_root('tests', 'unistd', 'isatty.out'), 'r').read() - self.do_run(src, expected, post_build=add_pre_run) + self.do_run(src, 'success', force_c=True) def test_unistd_sysconf(self): src = open(path_from_root('tests', 'unistd', 'sysconf.c'), 'r').read() |