Add test for round-tripping serialization of unmatched test specs

This commit is contained in:
Martin Hořeňovský 2022-10-27 19:11:20 +02:00
parent e19ed221bd
commit d2294ad9b6
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
1 changed files with 8 additions and 0 deletions

View File

@ -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
)