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

summaryrefslogtreecommitdiffhomepage
path: root/include/internal/catch_session.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2019-06-16 16:12:47 +0200
committerMartin Hořeňovský2019-10-29 14:07:18 +0100
commitd2cddfc9c5e1851dd46888f330ae324884f7c2c0 (patch)
treef301f6f14152c6e791a1317c28a888cc8ce550bc /include/internal/catch_session.cpp
parent557b3361254f4503a34602d4ad8bd35fce33de8c (diff)
downloadcatch3-d2cddfc9c5e1851dd46888f330ae324884f7c2c0.tar.gz
Make --list-* exit code be 0
Previously it returned the sum of listed things because ???. This was completely useless and in many ways actively counterproductive because of the success/failure conventions around exit codes. Closes #1410
Diffstat (limited to 'include/internal/catch_session.cpp')
-rw-r--r--include/internal/catch_session.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/internal/catch_session.cpp b/include/internal/catch_session.cpp
index b1d7a404..f490c88a 100644
--- a/include/internal/catch_session.cpp
+++ b/include/internal/catch_session.cpp
@@ -288,8 +288,9 @@ namespace Catch {
applyFilenamesAsTags( *m_config );
// Handle list request
- if( Option<std::size_t> listed = list( m_config ) )
- return static_cast<int>( *listed );
+ if (list(m_config)) {
+ return 0;
+ }
TestGroup tests { m_config };
auto const totals = tests.execute();