aboutsummaryrefslogtreecommitdiff
path: root/tests/test/cpp/preprocessor2.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test/cpp/preprocessor2.scm')
-rw-r--r--tests/test/cpp/preprocessor2.scm28
1 files changed, 24 insertions, 4 deletions
diff --git a/tests/test/cpp/preprocessor2.scm b/tests/test/cpp/preprocessor2.scm
index 71e0c1a0..27332894 100644
--- a/tests/test/cpp/preprocessor2.scm
+++ b/tests/test/cpp/preprocessor2.scm
@@ -641,8 +641,6 @@
(lex "\"stdio.h\""))))
;; TODO #include is subject to macro expansion
- ;; test with through resolve-header
-
(test-group "Actually including stuff"
(call-with-tmp-header "
@@ -1135,8 +1133,30 @@ _Pragma(\"not-called\")
#endif"))))
- (test-group "Nested conditions"
- 'TODO)
+ (test-equal "Nested conditions"
+ (lex "a\n\nc")
+ (run "
+#define X
+#ifdef X
+a
+#ifdef Y
+b
+#endif
+c
+#endif
+"))
+
+ (test-equal
+ (lex "")
+ (run "
+#ifdef X
+a
+#ifdef Y
+b
+#endif /* Y */
+c
+#endif /* X */
+"))
(test-group "Unexpected if ends"
(test-error "#else outside if"