aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/runner.py')
-rw-r--r--tests/runner.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 7bbfa80f..4d2c51c3 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -642,6 +642,27 @@ class T(unittest.TestCase):
'''
self.do_test(src, '*cleaned*')
+ def test_statics(self):
+ src = '''
+ #include <stdio.h>
+ #include <string.h>
+
+ #define CONSTRLEN 32
+
+ void conoutfv(const char *fmt)
+ {
+ static char buf[CONSTRLEN];
+ strcpy(buf, fmt);
+ puts(buf);
+ }
+
+ int main() {
+ conoutfv("*staticccz*");
+ return 0;
+ }
+ '''
+ self.do_test(src, '*staticccz*')
+
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: