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

Documentation tests that are not preceded by a blank line are not run #35461

Closed
shepmaster opened this issue Aug 7, 2016 · 2 comments
Closed

Comments

@shepmaster
Copy link
Member

To reproduce

Create a new project and place this as src/lib.rs

/// This doesn't get run:
/// ```
/// assert!(0 == 1);
/// ```
///
/// This will:
///
/// ```
/// assert!(1 == 2);
/// ```
fn one() {}

Run cargo test

What I expected

To see two failed tests.

What actually happened

Only the second test is run.

Meta

$ cargo --version
cargo 0.11.0-nightly (259324c 2016-05-20)
$ rustc --version --verbose
rustc 1.10.0 (cfcb716cf 2016-07-03)
binary: rustc
commit-hash: cfcb716cf0961a7e3a4eceac828d94805cf8140b
commit-date: 2016-07-03
host: x86_64-apple-darwin
release: 1.10.0
@TimNN
Copy link
Contributor

TimNN commented Aug 7, 2016

I believe this is a duplicate of #28712.

@shepmaster
Copy link
Member Author

@TimNN quite right, thank you for being better at searching than I am!

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

2 participants