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:
Isaac Corbrey 2020-07-28 05:19:58 -09:00
parent b49ccadb4a
commit e996422d3a

View File

@ -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
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
output of `cargo test \-- --help`. As an example, this will run all tests with
`foo` in their name on 3 threads in parallel:
output of `cargo test \-- --help`.
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
@ -152,6 +154,10 @@ include::section-exit-status.adoc[]
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:
cargo test --test int_test_name -- modname::test_name