Skip to content

Reject empty tag filters as invalid test specifications - #3201

Open
vzer200 wants to merge 1 commit into
catchorg:develfrom
vzer200:fix/reject-empty-tag-filters
Open

Reject empty tag filters as invalid test specifications#3201
vzer200 wants to merge 1 commit into
catchorg:develfrom
vzer200:fix/reject-empty-tag-filters

Conversation

@vzer200

@vzer200 vzer200 commented Sep 8, 2026

Copy link
Copy Markdown

Description

Passing [] to SelfTest currently runs all default tests because the empty tag is silently discarded. Reject it as an invalid test specification (exit code 5), including negated filters, combined filters, and empty tags expanded from aliases.

Report the original argument once. Track whether the current tag contains any characters so that text left by an earlier argument cannot hide an empty tag. Add parser regressions, a CLI error-handling test, and a versioned documentation note.

Validation on Windows with LLVM-MinGW:

  • 224 parser assertions and all 83 basic CTest tests pass, including approvals. A separate review reran all 83 tests and compared 261 CLI argument vectors with the original build.
  • An eight-test fixture checked 1,230 argument combinations: 411 empty-tag combinations are rejected and 819 other combinations retain their original selections and exit codes.
  • The all-tests build succeeds; 143 of 145 CTest tests pass. The same two failures reproduce on unchanged upstream: ExperimentalRedirect's unused private field warning and the JUnit crash reporter's missing closing element. Builds use a local -Wno-error=pointer-bool-conversion flag for an existing Clang 23 warning; no compiler settings are changed in this PR.

Prepared with Codex and independently reviewed by a separate agent before submission.

GitHub Issues

Addresses the CLI follow-up in #2367. The original JUnit assertion crash is outside this change.

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.18%. Comparing base (897d804) to head (9c879c5).

Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #3201      +/-   ##
==========================================
+ Coverage   91.17%   91.18%   +0.01%     
==========================================
  Files         206      206              
  Lines        9031     9039       +8     
==========================================
+ Hits         8234     8242       +8     
  Misses        797      797              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant