summaryrefslogtreecommitdiff
path: root/tools/slang-test/slang-test-main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/slang-test/slang-test-main.cpp')
-rw-r--r--tools/slang-test/slang-test-main.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp
index 71f5c04bd..51c618187 100644
--- a/tools/slang-test/slang-test-main.cpp
+++ b/tools/slang-test/slang-test-main.cpp
@@ -3900,15 +3900,20 @@ static bool shouldRunTest(
if(!endsWithAllowedExtension(context, filePath))
return false;
- if( context->options.testPrefix )
+ if(!context->options.testPrefixes.getCount())
{
- if( strncmp(context->options.testPrefix, filePath.begin(), strlen(context->options.testPrefix)) != 0 )
+ return true;
+ }
+
+ // If we have prefixes, it has to match one of them
+ for(auto& p : context->options.testPrefixes)
+ {
+ if(filePath.startsWith(p))
{
- return false;
+ return true;
}
}
-
- return true;
+ return false;
}
void getFilesInDirectory(String directoryPath, List<String>& files)