diff options
Diffstat (limited to 'tools/slang-test/options.cpp')
| -rw-r--r-- | tools/slang-test/options.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/slang-test/options.cpp b/tools/slang-test/options.cpp index 65783477f..ec30262fc 100644 --- a/tools/slang-test/options.cpp +++ b/tools/slang-test/options.cpp @@ -434,7 +434,20 @@ static bool _isSubCommand(const char* arg) StringUtil::split(text.getUnownedSlice(), '\n', lines); for (auto line : lines) { - optionsOut->expectedFailureList.add(line); + // Remove comments (everything after '#' character) + auto trimmedLine = line; + auto commentIndex = line.indexOf('#'); + if (commentIndex != -1) + { + trimmedLine = line.head(commentIndex); + } + + // Trim whitespace and skip empty lines + trimmedLine = trimmedLine.trim(); + if (trimmedLine.getLength() > 0) + { + optionsOut->expectedFailureList.add(trimmedLine); + } } } else if (strcmp(arg, "-test-dir") == 0) |
