Progmasoft Git

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

Fix CTest regex error

The desired behaviour was to match a literal "[.]", so the regex
has to be escaped as "\\[\\.\\]" -- double backslashes, because
it has to be escaped from CMake as well as from the regex engine.
Commit
a3876adba67b9e2237f8c46c27ecff7a1f246ac4
Author
Martin Hořeňovský ·
Parents
a81c01d4f99c

Files · Download .tar.gz

Changes

 projects/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/projects/CMakeLists.txt b/projects/CMakeLists.txt
index a2ddb23b..57f1f6f8 100644
--- a/projects/CMakeLists.txt
+++ b/projects/CMakeLists.txt
@@ -320,7 +320,7 @@ set_tests_properties(ListTests PROPERTIES
 add_test(NAME ListTags COMMAND $<TARGET_FILE:SelfTest> --list-tags)
 set_tests_properties(ListTags PROPERTIES 
     PASS_REGULAR_EXPRESSION "[0-9]+ tags" 
-    FAIL_REGULAR_EXPRESSION "[.]")
+    FAIL_REGULAR_EXPRESSION "\\[\\.\\]")
 
 add_test(NAME ListReporters COMMAND $<TARGET_FILE:SelfTest> --list-reporters)
 set_tests_properties(ListReporters PROPERTIES PASS_REGULAR_EXPRESSION "Available reporters:")