From 7b9bf633be13274ada5bb896367fcf63796e5ef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Fri, 23 Oct 2020 23:02:09 +0200 Subject: [PATCH] Tighten the test for matching filenames-as-tags --- tests/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6d6a00c8..a7651a03 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -209,7 +209,12 @@ set_tests_properties(FilenameAsTagsTest PROPERTIES PASS_REGULAR_EXPRESSION "\\[# # Check that the filename tags can also be matched against (#2064) add_test(NAME FilenameAsTagsMatching COMMAND $ -\# --list-tags [\#Approx.tests]) -set_tests_properties(FilenameAsTagsMatching PROPERTIES PASS_REGULAR_EXPRESSION "\\[#Approx.tests\\]") +set_tests_properties(FilenameAsTagsMatching + PROPERTIES + PASS_REGULAR_EXPRESSION "\\[#Approx.tests\\]" + # Avoids false positives by looking for start of line (newline) before the 0 + FAIL_REGULAR_EXPRESSION "[\r\n]0 tag" +) add_test(NAME EscapeSpecialCharactersInTestNames COMMAND $ "Test with special\\, characters \"in name") set_tests_properties(EscapeSpecialCharactersInTestNames PROPERTIES PASS_REGULAR_EXPRESSION "1 assertion in 1 test case")