aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-02 20:10:19 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-02 20:10:19 -0800
commit0bea4bec8e1e21c280f99264cc7ec68ed4820717 (patch)
treeb42bcf4ed61564f6e491686893d2beb3a9f56419 /tests
parentb9522ed475bda6fda0cad4a7302d9f23b4529ad0 (diff)
parentca12d620e84fc5284976fb3ecfb8ef30ee7cfe4a (diff)
Merge pull request #116 from eclecticdave/master
exit() throws uncaught exception
Diffstat (limited to 'tests')
-rw-r--r--tests/runner.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index ea2025b7..bd01d6d2 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -4533,6 +4533,19 @@ Child2:9
except:
pass
+ def test_exit_status(self):
+ Settings.CATCH_EXIT_CODE = 1
+
+ src = '''
+ #include <stdio.h>
+ #include <stdlib.h>
+ int main()
+ {
+ printf("hello, world!\\n");
+ exit(118); // Unusual exit status to make sure it's working!
+ }
+ '''
+ self.do_run(src, 'hello, world!\nExit Status: 118')
# Generate tests for all our compilers
def make_run(name, compiler, llvm_opts, embetter, quantum_size, typed_arrays):