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

Add test for round-tripping serialization of unmatched test specs

Commit
d2294ad9b67001a56640eb0babde3a9fd3092bde
Author
Martin Hořeňovský ·
Parents
e19ed221bde6

Files · Download .tar.gz

Changes

 tests/CMakeLists.txt | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index ff941cef..df0a7d5d 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -264,6 +264,14 @@ add_test(NAME TestSpecs::OverrideFailureWithNoMatchedTests
   COMMAND $<TARGET_FILE:SelfTest> "___nonexistent_test___" --allow-running-no-tests
 )
 
+add_test(NAME TestSpecs::NonMatchingTestSpecIsRoundTrippable
+    COMMAND $<TARGET_FILE:SelfTest> Tracker, "this test does not exist" "[nor does this tag]"
+)
+set_tests_properties(TestSpecs::NonMatchingTestSpecIsRoundTrippable
+  PROPERTIES
+    PASS_REGULAR_EXPRESSION "No test cases matched '\"this test does not exist\" \\[nor does this tag\\]'"
+)
+
 add_test(NAME Warnings::UnmatchedTestSpecIsAccepted
   COMMAND $<TARGET_FILE:SelfTest> Tracker --warn UnmatchedTestSpec
 )