]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #20183 : japaric/rust/doctests, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 26 Dec 2014 03:01:42 +0000 (03:01 +0000)
committerbors <bors@rust-lang.org>
Fri, 26 Dec 2014 03:01:42 +0000 (03:01 +0000)
#20075 introduced a bug where unmarked code fences weren't considered as doctests. This PR fixes the logic.

---

This passed `check-stage1-rustdoc`, and I manually checked that:

``` rust
//! ```
//! println!("Hello")
//! ```
//!
//! ``` rust
//! println!("Hello")
//! ```
//!
//! ``` sh
//! println!("Hello")
//! ```
//!
//! ``` ignore
//! println!("Hello")
//! ```
```

Generated:

``` rust
running 3 tests
test _2 ... ignored
test _0 ... ok
test _1 ... ok
```

I'd love to add that as a test, but I have no idea how to do that with our testing infrastructure. If anyone knows how, do let me know!

r? @alexcrichton
@seanmonstar feedback?


Trivial merge