diff tests/t28.c @ 126:cb08e397ce7b

Test nested ifs.
author David A. Holland
date Wed, 12 Jun 2013 10:51:10 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/t28.c	Wed Jun 12 10:51:10 2013 -0400
@@ -0,0 +1,53 @@
+#if 1
+. right
+
+# if 1
+.. right
+# elif 1
+.. wrong
+# elif 0
+.. wrong
+# else
+.. wrong
+# endif
+
+#elif 1
+. wrong
+
+# if 1
+.. wrong
+# elif 1
+.. wrong
+# elif 0
+.. wrong
+# else
+.. wrong
+# endif
+
+#elif 0
+. wrong
+
+# if 1
+.. wrong
+# elif 1
+.. wrong
+# elif 0
+.. wrong
+# else
+.. wrong
+# endif
+
+#else
+. wrong
+
+# if 1
+.. wrong
+# elif 1
+.. wrong
+# elif 0
+.. wrong
+# else
+.. wrong
+# endif
+
+#endif