Cargo does not show ouput (e.g. stdout) from doctests with --nocapture
#142295
Labels
A-doctests
Area: Documentation tests, run by rustdoc
--nocapture
#142295
Problem
As described in this closed issue: rust-lang/cargo#1732, there is no output (e.g. stdout) printed from doctests ran through cargo (e.g.
cargo test --doc -- --nocapture
) even when explicitly providing the--nocapture
flag. Unfortunately the previous issue was closed without being fully resolved as indicated by recent comments.Support for
--nocapture
was added to rustdoc in this PR: #86230A PR to support this in cargo was proposed but it was never resolved: rust-lang/cargo#9705
Steps
cargo new --lib doc_testing
cargo test --doc -- --nocapture
I expect cargo to show the output of the two print statements, however the output is only:
Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: