diff --git a/projects/CMakeLists.txt b/projects/CMakeLists.txt index 7105632b..0eb7cb56 100644 --- a/projects/CMakeLists.txt +++ b/projects/CMakeLists.txt @@ -429,6 +429,9 @@ set_tests_properties(LibIdentityTest PROPERTIES PASS_REGULAR_EXPRESSION "descrip add_test(NAME FilenameAsTagsTest COMMAND $ -\# --list-tags) set_tests_properties(FilenameAsTagsTest PROPERTIES PASS_REGULAR_EXPRESSION "\\[#Approx.tests\\]") +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") + if (CATCH_USE_VALGRIND) add_test(NAME ValgrindRunTests COMMAND valgrind --leak-check=full --error-exitcode=1 $) diff --git a/projects/SelfTest/Baselines/compact.sw.approved.txt b/projects/SelfTest/Baselines/compact.sw.approved.txt index 9a7abcef..03b49599 100644 --- a/projects/SelfTest/Baselines/compact.sw.approved.txt +++ b/projects/SelfTest/Baselines/compact.sw.approved.txt @@ -1235,6 +1235,7 @@ Misc.tests.cpp:: passed: v.size() == V for: 15 == 15 Misc.tests.cpp:: passed: v.capacity() >= V for: 15 >= 15 VariadicMacros.tests.cpp:: passed: with 1 message: 'no assertions' Tricky.tests.cpp:: passed: 0x == bit30and31 for: 3221225472 (0x) == 3221225472 +CmdLine.tests.cpp:: passed: Message.tests.cpp:: failed - but was ok: 1 == 2 Misc.tests.cpp:: passed: with 1 message: 'oops!' Exception.tests.cpp:: failed: unexpected exception with message: 'For some reason someone is throwing a string literal!' diff --git a/projects/SelfTest/Baselines/console.std.approved.txt b/projects/SelfTest/Baselines/console.std.approved.txt index d2b2165f..5798dcbe 100644 --- a/projects/SelfTest/Baselines/console.std.approved.txt +++ b/projects/SelfTest/Baselines/console.std.approved.txt @@ -1380,6 +1380,6 @@ due to unexpected exception with message: Why would you throw a std::string? =============================================================================== -test cases: 300 | 226 passed | 70 failed | 4 failed as expected -assertions: 1568 | 1416 passed | 131 failed | 21 failed as expected +test cases: 301 | 227 passed | 70 failed | 4 failed as expected +assertions: 1569 | 1417 passed | 131 failed | 21 failed as expected diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt index 6eabf307..b4aba834 100644 --- a/projects/SelfTest/Baselines/console.sw.approved.txt +++ b/projects/SelfTest/Baselines/console.sw.approved.txt @@ -9321,6 +9321,14 @@ Tricky.tests.cpp:: PASSED: with expansion: 3221225472 (0x) == 3221225472 +------------------------------------------------------------------------------- +Test with special, characters "in name +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + ------------------------------------------------------------------------------- The NO_FAIL macro reports a failure but does not fail the test ------------------------------------------------------------------------------- @@ -12520,6 +12528,6 @@ Misc.tests.cpp: Misc.tests.cpp:: PASSED: =============================================================================== -test cases: 300 | 210 passed | 86 failed | 4 failed as expected -assertions: 1585 | 1416 passed | 148 failed | 21 failed as expected +test cases: 301 | 211 passed | 86 failed | 4 failed as expected +assertions: 1586 | 1417 passed | 148 failed | 21 failed as expected diff --git a/projects/SelfTest/Baselines/junit.sw.approved.txt b/projects/SelfTest/Baselines/junit.sw.approved.txt index e764d1f6..a768f1e6 100644 --- a/projects/SelfTest/Baselines/junit.sw.approved.txt +++ b/projects/SelfTest/Baselines/junit.sw.approved.txt @@ -1,7 +1,7 @@ - + @@ -808,6 +808,7 @@ Misc.tests.cpp: + diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt index b58684d7..c4e5a75e 100644 --- a/projects/SelfTest/Baselines/xml.sw.approved.txt +++ b/projects/SelfTest/Baselines/xml.sw.approved.txt @@ -11269,6 +11269,9 @@ Message from section two + + + @@ -14912,7 +14915,7 @@ loose text artifact - + - + diff --git a/projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp b/projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp index 6ecc3a14..60eb97af 100644 --- a/projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp +++ b/projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp @@ -506,3 +506,8 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]" } } } + +TEST_CASE("Test with special, characters \"in name", "[cli][regression]") { + // This test case succeeds if we can invoke it from the CLI + SUCCEED(); +}