aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-07-14 16:24:28 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-07-14 16:24:28 -0700
commitb87be16d64b81efd5c5e9187d3cd601441b4af31 (patch)
tree7d6f00dc2aac41d0f5e0481d0361d105afafe2f5 /tests/runner.py
parent50d5267788a63edac12bd7b11389108e63959a05 (diff)
parent739c8dade7eaed3e2fe26cbeb26f051185735500 (diff)
Merge pull request #1381 from inolen/tty_fixes
isatty and ttyname fixes
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-xtests/runner.py24
1 files changed, 2 insertions, 22 deletions
diff --git a/tests/runner.py b/tests/runner.py
index bc0c77a4..ea702689 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -7150,18 +7150,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()
@@ -7193,18 +7183,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()