I found out on IRC that I could use cargo test test_name to run specific tests (actually any tests containing the text).
Despite being a very useful feature I couldn't find it documented anywhere.
Cargo doesn't actually support running specific tests, instead we just pass the test_name argument to the test binary itself, and then _rust's_ test runner uses that as a filter. This is also documented in cargo test -h, however, so I'm curious where you're thinking this documentation needs to go?
In my opinion it should be stated in Cargo Guide or FAQ.
I didn't realize it was at the cargo test -h though, it may be enough.
@arthurprs For what it's worth, I just googled rust run specific tests and found the answer here. :smile:
This thread is old.
Now
cargo test test_function_name
simply works!
Most helpful comment
@arthurprs For what it's worth, I just googled
rust run specific testsand found the answer here. :smile: