aboutsummaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 17:14:22 +0200
committerVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 19:36:02 +0200
commit98bb3dd7d7bb45eae92975a6f8ebf5ed4fc1ecab (patch)
tree486f65d85a339be8f8cf8ad61f9b31b8518eac7f /tests/test_core.py
parenta5f8823964c30222ba9cddc370a814ba9c4528f3 (diff)
Use do_run_from_file() for test_fakestat
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 6349d47c..01154605 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -4476,17 +4476,10 @@ return malloc(size);
self.do_run_from_file(src, output)
def test_fakestat(self):
- src = r'''
- #include <stdio.h>
- struct stat { int x, y; };
- int main() {
- stat s;
- s.x = 10;
- s.y = 22;
- printf("*%d,%d*\n", s.x, s.y);
- }
- '''
- self.do_run(src, '*10,22*')
+ test_path = path_from_root('tests', 'core', 'test_fakestat')
+ src, output = (test_path + s for s in ('.in', '.out'))
+
+ self.do_run_from_file(src, output)
def test_mmap(self):
if self.emcc_args is None: return self.skip('requires emcc')