-
Notifications
You must be signed in to change notification settings - Fork 2.6k
cargo test --doc
does not test examples
#2684
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
Comments
I've submitted a pull request. #2685 |
Fix `cargo test --doc` not testing examples When running cargo doc --test in a project folder, cargo does not test documentation examples, it only builds the project and exits. Refer to issue #2684
Fixed by #2685. |
Hi, I am able to replicate this problem with |
+1 on Edit: It works on |
@dianpopa Can you post an example package that demonstrates the problem? @sorenmortensen |
@ehuss That's correct, it doesn't even print Edit: even when I force it to run the doc tests by running |
I believe I've found the culprit. It's because I've set the Here is a minimal example that reproduces the problem. |
@sorenmortensen Thanks for the info. Only |
I discovered what was the problem for me. If I remove |
@dianpopa I suggest you add your use case on rust-lang/rust#44404. Unfortunately I suspect it's not easy to fix, but collecting feedback might help. |
When running
cargo doc --test
in a project folder, cargo does not test documentation examples, it only builds the project and exits.This is when running cargo from nightly.
The text was updated successfully, but these errors were encountered: