Skip to content

Cargo test ignores test flags when testing specific keyword #10268

Closed
@dist1ll

Description

@dist1ll

Problem

When running cargo test xyz, cargo ignores all test flags in the cargo.toml file.

Steps

  1. create project cargo init xyz
  2. add #[test] fn random{} to your main.rs
  3. add the following to your Cargo.toml
[[bin]]
name = "main"
path = "src/main.rs"
test = false
  1. type cargo test and then type cargo test xyz

Result:
Capture

Possible Solution(s)

No response

Notes

No response

Version

cargo 1.59.0-nightly (358e79fe5 2022-01-04)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions