Skip to content

Commit e996422

Browse files
author
Isaac Corbrey
committed
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.
1 parent b49ccad commit e996422

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/doc/man/cargo-test.adoc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ dashes (`--`) are passed to the test binaries and thus to _libtest_ (rustc's
2121
built in unit-test and micro-benchmarking framework). If you're passing
2222
arguments to both Cargo and the binary, the ones after `--` go to the binary,
2323
the ones before go to Cargo. For details about libtest's arguments see the
24-
output of `cargo test \-- --help`. As an example, this will run all tests with
25-
`foo` in their name on 3 threads in parallel:
24+
output of `cargo test \-- --help`.
25+
26+
As an example, this will filter for tests with `foo` in their name and run them
27+
on 3 threads in parallel:
2628

2729
cargo test foo -- --test-threads 3
2830

@@ -152,6 +154,10 @@ include::section-exit-status.adoc[]
152154

153155
cargo test
154156

157+
. Run only tests whose names match against a filter string:
158+
159+
cargo test name_filter
160+
155161
. Run only a specific test within a specific integration test:
156162

157163
cargo test --test int_test_name -- modname::test_name

0 commit comments

Comments
 (0)