]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Don't ignore empty newlines when match in the testsuite, instead only ignore when...
authorDale Weiler <killfieldengine@gmail.com>
Wed, 28 Aug 2013 07:34:05 +0000 (03:34 -0400)
committerDale Weiler <killfieldengine@gmail.com>
Wed, 28 Aug 2013 07:34:05 +0000 (03:34 -0400)
test.c

diff --git a/test.c b/test.c
index 6fdee5134de3d07d85738035f881d62b2234a1a8..6e6aa0ae490e116945f8ec66915bfd3f76d3ccb0 100644 (file)
--- a/test.c
+++ b/test.c
@@ -1060,11 +1060,13 @@ static bool task_trymatch(size_t i, char ***line) {
                 }
             }
 
+
             /*
-             * If data is just null now, that means the line was an empty
-             * one and for that, we just ignore it.
+             * We need to ignore null lines for when -pp is used (preprocessor), since
+             * the preprocessor is likely to create empty newlines in certain macro
+             * instantations, otherwise it's in the wrong nature to ignore empty newlines.
              */
-            if (!*data)
+            if (!strcmp(tmpl->proceduretype, "-pp") && !*data)
                 continue;
 
             if (vec_size(tmpl->comparematch) > compare) {