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

nocapture for doc-tests #1732

Closed
diwic opened this issue Jun 18, 2015 · 4 comments
Closed

nocapture for doc-tests #1732

diwic opened this issue Jun 18, 2015 · 4 comments

Comments

@diwic
Copy link

diwic commented Jun 18, 2015

Hi,

For ordinary tests, I can run cargo test -- --nocapture and the output will shown on-screen. However, I have doc-tests as well (examples in the documentation), and even though I use --nocapture the output of these are not shown.

I'm not sure whether this is a bug in cargo or somewhere else, but at least the behaviour is inconsistent.

@alexcrichton
Copy link
Member

Are you sure that this doesn't work? I just ran cargo test -- --nocapture and saw all the output from the doctests (the compiles). The actual output of the tests themselves isn't printed anywhere, but that's a rustdoc issue, not a Cargo one.

@diwic
Copy link
Author

diwic commented Jun 19, 2015

The actual output of the tests themselves isn't printed anywhere

Right, that's what I'm missing.

@diwic
Copy link
Author

diwic commented Jun 19, 2015

Closing, already filed: rust-lang/rust#26309

@diwic diwic closed this as completed Jun 19, 2015
@jsermeno
Copy link

jsermeno commented Dec 2, 2024

Linking the follow-up pull request since this issue is what comes up in a Google search. Rustdoc fixed the issue in 2021. There was a pull request to fix the issue in Cargo, but the pull request was never resolved: #9705.

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

No branches or pull requests

3 participants