Skip to content

Commit

Permalink
Auto merge of #13448 - epage:test, r=weihanglo
Browse files Browse the repository at this point in the history
fix(test): Suggest `--` for libtest arguments

We already do this so long as the argument doesn't look like a `cargo test` argument (e.g. `--show-output`)
but `--ignored` looks like `--ignore-rust-version` do the the suggestion algorithms prefix checks.

Before
```
error: unexpected argument '--ignored' found

  tip: a similar argument exists: '--ignore-rust-version'

Usage: cargo test --ignore-rust-version [TESTNAME] [-- [ARGS]...]

For more information, try '--help'.
```
After
```
error: unexpected argument '--ignored' found

  tip: a similar argument exists: '--ignore-rust-version'
  tip: to pass '--ignored' as a value, use '-- --ignored'

Usage: cargo test --ignore-rust-version [TESTNAME] [-- [ARGS]...]

For more information, try '--help'.
```

This was fixed in clap-rs/clap#5356 and we just need to update to take advantage of it.

Fixes #12494
  • Loading branch information
bors committed Feb 16, 2024
2 parents 57d14e4 + 6f93fa7 commit 63581b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ cargo-test-support = { path = "crates/cargo-test-support" }
cargo-util = { version = "0.2.6", path = "crates/cargo-util" }
cargo-util-schemas = { version = "0.2.0", path = "crates/cargo-util-schemas" }
cargo_metadata = "0.18.1"
clap = "4.4.18"
clap = "4.5.1"
color-print = "0.3.5"
core-foundation = { version = "0.9.4", features = ["mac_os_10_7_support"] }
crates-io = { version = "0.40.0", path = "crates/crates-io" }
Expand Down

0 comments on commit 63581b3

Please sign in to comment.