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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ledusledus
Copy link

The section on how to run a single test is not precise for cases where test names are substrings of other tests which generates questions like https://stackoverflow.com/questions/54585804/how-to-run-a-specific-unit-test-in-rust.

I propose to point to --exact argument for this case.

@chriskrycho
Copy link
Contributor

Thanks for opening this! We will talk about the best way to proceed here: it is possible we should add this kind of extra explanatory text, but there are also a lot of other details about how to handle things with cargo test which we do not include. In general, people should not expect the book to cover everything (it would be literally 10× the length if it did!) but rather to provide good foundations so that people can successfully discover and learn there rest on their own, e.g. by running cargo help test. (The reason I am not just closing this is because --exact in particular is pretty difficult to find! So I do think we will talk about it, but I think we will probably still end up closing it.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants