aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-03-29 21:14:53 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-03-29 21:14:53 -0700
commitf3bffe4b06fc4afd5c02095ebb53a7e4cb39df9a (patch)
treee9afe668978b324cfdb5e342089ccc6239eb38ef /tests/runner.py
parent68c0053f8ae8a10c210a2a871473dd914db74a35 (diff)
basic support for -M and -MM
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-xtests/runner.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 796948b2..8a4ee811 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -6683,6 +6683,12 @@ f.close()
output = Popen([NODE_JS, JS_OPTIMIZER, input] + passes, stdin=PIPE, stdout=PIPE).communicate()[0]
self.assertIdentical(expected, output.replace('\n\n', '\n'))
+ def test_m_mm(self):
+ open(os.path.join(self.get_dir(), 'foo.c'), 'w').write('''/* */''')
+ for opt in ['M', 'MM']:
+ output = Popen(['python', EMCC, os.path.join(self.get_dir(), 'foo.c'), '-' + opt], stdout=PIPE).communicate()[0]
+ assert 'foo.o: ' in output, '-%s failed to produce the right output: %s' % (opt, output)
+
def test_llvm_nativizer(self):
# avoid impure_ptr problems etc.
shutil.copyfile(path_from_root('tests', 'files.cpp'), os.path.join(self.get_dir(), 'files.cpp'))