Fix section filtering to make sense

Specifically, this commit makes the `-c`/`--section` parameter
strictly ordered and hierarchical, unlike how it behaved before,
which was a huge mess -- see #3038 for details.

Closes #3038
This commit is contained in:
Martin Hořeňovský committed 2025-10-16 09:16:56 +02:00
1 parent 33e6fd217a
commit 49d79e9e9c
6 files changed
+208 -47

No files matched your search

+2 -6
View File
@@ -129,12 +129,8 @@ namespace Catch {
for ( auto const& child : m_children ) {
if ( child->isSectionTracker() &&
std::find( filters.begin(),
filters.end(),
static_cast<SectionTracker const&>(
*child )
.trimmedName() ) !=
filters.end() ) {
static_cast<SectionTracker const&>( *child )
.trimmedName() == filters[0] ) {
return true;
}
}