Skip to content

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

@shepmaster

Description

@shepmaster
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

Activity

TimNN

TimNN commented on Aug 7, 2016

@TimNN
Contributor

I believe this is a duplicate of #28712.

shepmaster

shepmaster commented on Aug 7, 2016

@shepmaster
MemberAuthor

@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @shepmaster@TimNN

        Issue actions

          Documentation tests that are not preceded by a blank line are not run · Issue #35461 · rust-lang/rust