aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authordglead <none@none>2010-12-28 19:52:20 -0800
committerdglead <none@none>2010-12-28 19:52:20 -0800
commit27c9f996cfc6a4e8a3e03630588ab68349fe4d17 (patch)
treed6e4a154fc9cd4b33f338140ac2b4cd6abcf0408 /tests/runner.py
parent015823fb76b5c4572dd98f29ca13c5e75f911852 (diff)
prevent strings with C-style comments from breaking helpful comments in generated code
Diffstat (limited to 'tests/runner.py')
-rw-r--r--tests/runner.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/runner.py b/tests/runner.py
index cc1b1309..ef6f024d 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -392,10 +392,12 @@ if 'benchmark' not in sys.argv:
const char *foolingthecompiler = "\\rabcd";
printf("%d\\n", strlen(foolingthecompiler)); // Tests parsing /0D in llvm - should not be a 0 (end string) then a D!
printf("%s\\n", NULL); // Should print '(null)', not the string at address 0, which is a real address for us!
+ printf("/* a comment */\\n"); // Should not break the generated code!
+ printf("// another\\n"); // Should not break the generated code!
return 0;
}
'''
- self.do_test(src, '*4*wowie*too*76*5*(null)*', ['wowie', 'too', '74'], lambda x: x.replace('\n', '*'))
+ self.do_test(src, '*4*wowie*too*76*5*(null)*/* a comment */*// another', ['wowie', 'too', '74'], lambda x: x.replace('\n', '*'))
def test_funcs(self):
src = '''