diff options
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index 76fa7a8a..7479aaf0 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -6482,6 +6482,13 @@ f.close() open(os.path.join(self.get_dir(), 'a.out.js'), 'w').write(src) self.assertNotContained('pre-run\nhello from main\npost-run\n', run_js(os.path.join(self.get_dir(), 'a.out.js'))) + # noInitialRun prevents run + for no_initial_run in [0, 1]: + Popen(['python', EMCC, os.path.join(self.get_dir(), 'main.cpp')]).communicate() + src = 'var Module = { noInitialRun: %d };\n' % no_initial_run + open(os.path.join(self.get_dir(), 'a.out.js')).read(); + open(os.path.join(self.get_dir(), 'a.out.js'), 'w').write(src) + assert ('hello from main' in run_js(os.path.join(self.get_dir(), 'a.out.js'))) != no_initial_run, 'only run if no noInitialRun' + def test_eliminator(self): input = open(path_from_root('tools', 'eliminator', 'eliminator-test.js')).read() expected = open(path_from_root('tools', 'eliminator', 'eliminator-test-output.js')).read() |