Skip to content

Commit

Permalink
Link to the rustc book for docs about cargo test -- <this stuff>
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskrycho committed Nov 27, 2024
1 parent 3afd582 commit 871ace8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/ch11-02-running-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ binary. To separate these two types of arguments, you list the arguments that
go to `cargo test` followed by the separator `--` and then the ones that go to
the test binary. Running `cargo test --help` displays the options you can use
with `cargo test`, and running `cargo test -- --help` displays the options you
can use after the separator.
can use after the separator. Those options are also documented in [the “Tests”
section][tests] of the [the rustc book][rustc].

[tests]: https://doc.rust-lang.org/rustc/tests/index.html
[rustc]: https://doc.rust-lang.org/rustc/index.html


### Running Tests in Parallel or Consecutively

Expand Down Expand Up @@ -128,10 +133,6 @@ Only the test with the name `one_hundred` ran; the other two tests didn’t matc
that name. The test output lets us know we had more tests that didn’t run by
displaying `2 filtered out` at the end.

If a test name is a substring of another test, we can use `-- --exact` argument,
referring to test function with full path, for example
`cargo test tests::one_hundred -- --exact`.

We can’t specify the names of multiple tests in this way; only the first value
given to `cargo test` will be used. But there is a way to run multiple tests.

Expand Down

0 comments on commit 871ace8

Please sign in to comment.