aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-04-05 10:47:19 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-04-05 10:47:19 -0700
commit1c504965bdb643dc338774a4eb5027a0030ae837 (patch)
tree6871d3c7e5ab0b808c92ce699c8315adc144f0e3 /tests/runner.py
parente4d888ce84ea774e95e4b1122e908fb2a6a2f64c (diff)
allow calling callMain even if run() was not called
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-xtests/runner.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 23935656..0a8e0209 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -9975,7 +9975,7 @@ f.close()
if no_initial_run:
# Calling main later should still work, filesystem etc. must be set up.
- src = open(os.path.join(self.get_dir(), 'a.out.js')).read() + '\n_main();\n';
+ src = open(os.path.join(self.get_dir(), 'a.out.js')).read() + '\nModule.callMain();\n';
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')), 'main should print when called manually'