aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/runner.py')
-rw-r--r--tests/runner.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index b372ee51..06069da2 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -4531,6 +4531,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):