mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
fix: Clarify test name filter usage
Set aside description of the usage example in the top description section and added a more consise example in the example section at the bottom of the man page.
This commit is contained in:
parent
b49ccadb4a
commit
e996422d3a
@ -21,8 +21,10 @@ dashes (`--`) are passed to the test binaries and thus to _libtest_ (rustc's
|
|||||||
built in unit-test and micro-benchmarking framework). If you're passing
|
built in unit-test and micro-benchmarking framework). If you're passing
|
||||||
arguments to both Cargo and the binary, the ones after `--` go to the binary,
|
arguments to both Cargo and the binary, the ones after `--` go to the binary,
|
||||||
the ones before go to Cargo. For details about libtest's arguments see the
|
the ones before go to Cargo. For details about libtest's arguments see the
|
||||||
output of `cargo test \-- --help`. As an example, this will run all tests with
|
output of `cargo test \-- --help`.
|
||||||
`foo` in their name on 3 threads in parallel:
|
|
||||||
|
As an example, this will filter for tests with `foo` in their name and run them
|
||||||
|
on 3 threads in parallel:
|
||||||
|
|
||||||
cargo test foo -- --test-threads 3
|
cargo test foo -- --test-threads 3
|
||||||
|
|
||||||
@ -152,6 +154,10 @@ include::section-exit-status.adoc[]
|
|||||||
|
|
||||||
cargo test
|
cargo test
|
||||||
|
|
||||||
|
. Run only tests whose names match against a filter string:
|
||||||
|
|
||||||
|
cargo test name_filter
|
||||||
|
|
||||||
. Run only a specific test within a specific integration test:
|
. Run only a specific test within a specific integration test:
|
||||||
|
|
||||||
cargo test --test int_test_name -- modname::test_name
|
cargo test --test int_test_name -- modname::test_name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user