diff options
author | alon@honor <none@none> | 2010-09-04 21:39:06 -0700 |
---|---|---|
committer | alon@honor <none@none> | 2010-09-04 21:39:06 -0700 |
commit | cd668dc906a4225032273b47f4745756fa8c0aed (patch) | |
tree | 6052ba5bebb3c7eef120e53e915542ec46cad0bc /tests | |
parent | c3d043f32921b28dee20c5b68e0c1424d266b2a3 (diff) |
atexit +test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/runner.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index bc97cc01..e48ff69d 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -579,6 +579,23 @@ class T(unittest.TestCase): ''' self.do_test(src, '*cheez: 10+24*') + def test_atexit(self): + src = ''' + #include <stdio.h> + #include <stdlib.h> + + void clean() + { + printf("*cleaned*\\n"); + } + + int main() { + atexit(clean); + return 0; + } + ''' + self.do_test(src, '*cleaned*') + def test_fannkuch(self): results = [ (1,0), (2,1), (3,2), (4,4), (5,7), (6,10), (7, 16), (8,22) ] for i, j in results: |