]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-ui/failed-doctest-output.rs
add failure-status to rustdoc doctest ui test
[rust.git] / src / test / rustdoc-ui / failed-doctest-output.rs
1 // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // Issue #51162: A failed doctest was not printing its stdout/stderr
12 // FIXME: if/when the output of the test harness can be tested on its own, this test should be
13 // adapted to use that, and that normalize line can go away
14
15 // compile-flags:--test
16 // normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
17 // failure-status: 101
18
19 // doctest fails at runtime
20 /// ```
21 /// panic!("oh no");
22 /// ```
23 pub struct SomeStruct;
24
25 // doctest fails at compile time
26 /// ```
27 /// no
28 /// ```
29 pub struct OtherStruct;