diff options
| author | Copilot <198982749+Copilot@users.noreply.github.com> | 2025-07-18 13:14:33 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-18 20:14:33 +0000 |
| commit | 3df9fe8a8a1aa01db2651eacd1d8bec50d0ee90c (patch) | |
| tree | ae5cac42509e4d1d0ca931e50992de8dab86f311 /tools | |
| parent | 70273599e2bb8a8e2b0f7b5e7ad47fe2f00b2b40 (diff) | |
Add comment support to expected-failure files in slang-test (#7817)
* Initial plan
* Add comment support to expected-failure files in slang-test
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
Diffstat (limited to 'tools')
| -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) |
