catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Add comma-escaping in test specs to ParseAndAddCatchTests.cmake
- Commit
bd667f4d696fd3f16f93f4584a5fa0b985d6b761- Author
- Martin Hořeňovský ·
- Parents
28db5ed4c98d
Changes
contrib/ParseAndAddCatchTests.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/ParseAndAddCatchTests.cmake b/contrib/ParseAndAddCatchTests.cmake index e28dc226..ff4fc667 100644 --- a/contrib/ParseAndAddCatchTests.cmake +++ b/contrib/ParseAndAddCatchTests.cmake @@ -172,6 +172,9 @@ function(ParseFile SourceFile TestTarget) PrintDebugMessage("Setting labels to ${Labels}") endif() + # Escape commas in the test spec + string(REPLACE "," "\\," Name ${Name}) + # Add the test and set its properties add_test(NAME "\"${CTestName}\"" COMMAND ${OptionalCatchTestLauncher} ${TestTarget} ${Name} ${AdditionalCatchParameters}) # Old CMake versions do not document VERSION_GREATER_EQUAL, so we use VERSION_GREATER with 3.8 instead