Allow trailing newline in trie files.
[platform/upstream/VK-GL-CTS.git] / framework / common / tcuCommandLine.cpp
index 93b3a86..6cb8295 100644 (file)
@@ -374,6 +374,15 @@ static void parseCaseTrie (CaseTreeNode* root, std::istream& in)
                        {
                                expectNode = false;
                                nodeStack.pop_back();
+
+                               // consume trailing new line
+                               if (nodeStack.empty())
+                               {
+                                       if (in.peek() == '\r')
+                                         in.get();
+                                       if (in.peek() == '\n')
+                                         in.get();
+                               }
                        }
                        else
                                expectNode = true;