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
This commit is contained in:
Martin Hořeňovský
2019-10-29 14:07:18 +01:00
parent 557b336125
commit d2cddfc9c5
5 changed files with 151 additions and 141 deletions
+3 -2
View File
@@ -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();