Skip to content

cargo test does not give any warning when the specific test case does not exist #14813

Closed as not planned
@yipu3

Description

@yipu3

Problem

If I run cargo test xxx when xxx does not exist. cargo does not give any warning but output a bunch of green output.

For example. I have a test case test_foo. Every time I change foo I run this test case by running cargo test test_foo. Then I change the name from test_foo to test_foo_ and forget to change the test command(For example, by using bash history). So every time I run cargo test I still got a bunch of green output which make me take the test as passed for granted, causing more confusion in the future.

Steps

cargo test xxx
xxx is a non-existing test case

Possible Solution(s)

Give warnings if the test case does not exist.

Notes

No response

Version


Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugCommand-testS-blocked-externalStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions