aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-02-14 19:30:16 -0500
committerAlon Zakai <alonzakai@gmail.com>2012-02-14 19:30:16 -0500
commit5466df2a6197e700a8e9d2b32e6c61eae7279ea3 (patch)
tree2ddc81319bd72c13801f4398fd83b9538115cda7 /tests/runner.py
parente6a4d7effcf522343051bf62abe074712858b3c3 (diff)
parenteb56795d36b7079b3b6a627c79be10789e028dec (diff)
Merge branch 'master' into incoming
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-xtests/runner.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index e2bb13d4..ac422e9e 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -2439,6 +2439,27 @@ def process(filename):
self.do_run(src, '*1*', force_c=True)
+ def test_atexit(self):
+ # Confirms they are called in reverse order
+ src = r'''
+ #include <stdio.h>
+ #include <stdlib.h>
+
+ static void cleanA() {
+ printf("A");
+ }
+ static void cleanB() {
+ printf("B");
+ }
+
+ int main() {
+ atexit(cleanA);
+ atexit(cleanB);
+ return 0;
+ }
+ '''
+ self.do_run(src, 'BA')
+
def test_time(self):
# XXX Not sure what the right output is here. Looks like the test started failing with daylight savings changes. Modified it to pass again.
src = open(path_from_root('tests', 'time', 'src.c'), 'r').read()