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

Have 'cargo test' (or something) run 'rustdoc --test' #334

Closed
SimonSapin opened this issue Aug 6, 2014 · 1 comment · Fixed by #302
Closed

Have 'cargo test' (or something) run 'rustdoc --test' #334

SimonSapin opened this issue Aug 6, 2014 · 1 comment · Fixed by #302

Comments

@SimonSapin
Copy link
Contributor

cargo doc is nice, but it doesn’t check my documentation’s examples.

Possibly related to #331 (if something is added to pass arbitrary parameters to rustdoc).

@alexcrichton
Copy link
Member

This will be closed by #302

bors added a commit that referenced this issue Aug 6, 2014
Whenever `cargo test` is run and a testable library target is available, the doc
tests will be run. This can be opted out of with `test = false` as usual.

This is currently not super useful due to rust-lang/rust#16157, but I expect
that to be merged soon. In the meantime examples will need to `extern crate foo`
explicitly.

Closes #334
@bors bors closed this as completed in #302 Aug 7, 2014
bors added a commit to alexcrichton/cargo that referenced this issue Sep 2, 2014
Whenever `cargo test` is run and a testable library target is available, the doc
tests will be run. This can be opted out of with `test = false` as usual.

This is currently not super useful due to rust-lang/rust#16157, but I expect
that to be merged soon. In the meantime examples will need to `extern crate foo`
explicitly.

Closes rust-lang#334
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.

2 participants