summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/slang-test/slang-test-main.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp
index ea5ada4b0..355f28a23 100644
--- a/tools/slang-test/slang-test-main.cpp
+++ b/tools/slang-test/slang-test-main.cpp
@@ -1716,6 +1716,23 @@ TestResult runLanguageServerTest(TestContext* context, TestInput& input)
if (!_areResultsEqual(input.testOptions->type, expectedOutput, actualOutput))
{
+ if (expectedOutput.startsWith("CONTAINS"))
+ {
+ List<UnownedStringSlice> words;
+ List<UnownedStringSlice> expectedLines;
+ StringUtil::calcLines(expectedOutput.getUnownedSlice(), expectedLines);
+ if (expectedLines.getCount() >= 1)
+ {
+ StringUtil::split(expectedLines[0], ' ', words);
+ if (words.getCount() >= 2)
+ {
+ if (actualOutput.contains(words[1].trim()))
+ {
+ return result;
+ }
+ }
+ }
+ }
context->getTestReporter()->dumpOutputDifference(expectedOutput, actualOutput);
result = TestResult::Fail;
}