#3174

Extend section filtering to support wildcards (Issue #3072)

OpenSinghAnsh07wants to merge intofrom

Description

What:

We have extended section path filtering to support wildcards and backslash escaping:

  1. Glob Pattern Matching: Reimplemented WildcardPattern to use a recursive glob_match helper instead of a simple start/end wildcard check. This enables full glob matching (including mid-string wildcards like A*B and multiple wildcards).
  2. Backslash Escaping: Added support for escaping backslashes and wildcards using \. For example, A\* matches A* exactly, and A\\* matches A\ at the start.
  3. PathFilter Integration: Pre-compiles section filters into WildcardPattern objects inside the PathFilter structure at CLI parsing time.
  4. Tracker Integration: Replaced exact string comparisons in SectionTracker (isFilteredImpl and isComplete) with wildcardPattern->matches(...).
  5. Unit Tests: Added unit tests verifying wildcard filtering and escaping behaviors directly in PartTracker.tests.cpp.

Why:

This enables flexible execution of nested test subsets. Users can now run a specific group of sections matching a naming convention (e.g., executing paragraphs or requirement groups) without having to specify each section individually, resolving a long-standing feature request.

GitHub Issues

Addresses https://github.com/catchorg/Catch2/issues/3072