diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index c89368815f..43465f0c46 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -342,7 +342,8 @@ namespace Catch { } if ( totals.testCases.total() > 0 && - totals.testCases.total() == totals.testCases.skipped ) { + totals.testCases.total() == totals.testCases.skipped + && !m_config->zeroTestsCountAsSuccess() ) { return 4; } diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 464fb683ac..023f478b83 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -273,6 +273,10 @@ add_test(NAME TestSpecs::OverrideFailureWithNoMatchedTests COMMAND $ "___nonexistent_test___" --allow-running-no-tests ) +add_test(NAME TestSpecs::OverrideAllSkipFailure + COMMAND $ "tests can be skipped dynamically at runtime" --allow-running-no-tests +) + add_test(NAME TestSpecs::NonMatchingTestSpecIsRoundTrippable COMMAND $ Tracker, "this test does not exist" "[nor does this tag]" )