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

cargo test --name not working #812

Closed
ghost opened this issue Nov 7, 2014 · 3 comments
Closed

cargo test --name not working #812

ghost opened this issue Nov 7, 2014 · 3 comments

Comments

@ghost
Copy link

ghost commented Nov 7, 2014

This command fails to produce any output:

cargo test --name <test_name>

However, this command runs the given test

cargo test <test_name>
@alexcrichton
Copy link
Member

Currently --name is the name of a target, not a test itself. Do you have a test executable named <test_name> for cargo to run?

@ghost
Copy link
Author

ghost commented Nov 7, 2014

This is probably a documentation error then. When I wanted to run a specific test, I ran cargo help test giving

    --name NAME              Name of the test to run

So I expected cargo test --name to run a test with NAME. However, cargo test <test_name> did what I wanted, but it doesn't appear to be documented.

@alexcrichton
Copy link
Member

Ah yes indeed! I'll try to clarify the docs. I'll point out though the bit at the end:

All of the trailing arguments are passed to the test binaries generated for
filtering tests and generally providing options configuring how they run.

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

Successfully merging a pull request may close this issue.

1 participant