Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMartin Hořeňovský2022-10-27 19:11:20 +0200
committerMartin Hořeňovský2022-10-27 19:11:20 +0200
commitd2294ad9b67001a56640eb0babde3a9fd3092bde (patch)
tree9fe9ed8a8205be8595b6097a697607e4b08bf9d3
parente19ed221bde6b8d8a1a62a71ed942c238ae345a7 (diff)
downloadcatch3-d2294ad9b67001a56640eb0babde3a9fd3092bde.tar.gz
Add test for round-tripping serialization of unmatched test specs
-rw-r--r--tests/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
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
)