Skip to content

A --filter copied from the report's own output silently matches nothing #1237

Closed

Description

@Chemaclass

Problem

The report prints a humanized title. --filter matches the function name, case-sensitively. So the most natural thing a user can do — copy the name they just read — selects nothing and the run ends on a bare No tests found with nowhere to go:

$ bashunit t_test.sh
✓ Passed: Beta case

$ bashunit --filter "Beta case" t_test.sh
 No tests found

It is sharper than it looks: the space is not required. test_alpha prints as Alpha, and --filter Alpha also finds nothing, because the match is case-sensitive. A single word copied verbatim from the output fails.

The project's own agent rules already warn about this ("it matches the function name … so a filter with spaces silently matches nothing"), which is evidence it bites people rather than a hypothetical.

Proposal

The run knows the filter and knows every function it sourced, so an empty selection can explain itself and name the test it most likely meant:

 No tests found
No test matches 'Beta case'. Filters match the function name, not the title: did you mean 'test_beta_case'?

Resolving both differences is what makes it land: lowercase the filter, and put underscores back where the humanized title shows spaces. With no plausible candidate it states the rule instead of guessing.

Constraints

Activity

  1. self-assigned this
    on Aug 14, 2026
  2. Chemaclass commented on Aug 14, 2026

    @Chemaclass
    MemberAuthor

    Done in #1238 (merged).

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions