Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refer to --exact for running the exact one test #3712

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/ch11-02-running-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ 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