diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-08-09 13:37:48 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-08-09 13:37:48 -0700 |
commit | 12700c43d60eaae9101cf307a25a211886add1c6 (patch) | |
tree | c958b5cf31c189f8e8821202e25b31b08f788193 /tests/runner.py | |
parent | b2c5250d4fd96387533724f6c48f4eec1400f3b5 (diff) |
print from exit(), so that explicitly calling it prints out the exit status
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py index d35e8750..8ab3609b 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -10236,6 +10236,7 @@ def process(filename): Settings.CORRECT_SIGNS = 0 def test_exit_status(self): + if self.emcc_args is None: return self.skip('need emcc') src = r''' #include <stdio.h> #include <stdlib.h> @@ -10251,12 +10252,12 @@ def process(filename): ''' open('post.js', 'w').write(''' Module.addOnExit(function () { - Module.print('Exit Status: ' + EXITSTATUS); + Module.print('I see exit status: ' + EXITSTATUS); }); Module.callMain(); ''') self.emcc_args += ['-s', 'INVOKE_RUN=0', '--post-js', 'post.js'] - self.do_run(src, 'hello, world!\ncleanup\nExit Status: 118') + self.do_run(src, 'hello, world!\nexit(118) called\ncleanup\nI see exit status: 118') def test_gc(self): if self.emcc_args == None: return self.skip('needs ta2') |