2018-07-09 14:26:22 -05:00
|
|
|
// Issue #51162: A failed doctest was not printing its stdout/stderr
|
2018-07-16 16:25:34 -05:00
|
|
|
// FIXME: if/when the output of the test harness can be tested on its own, this test should be
|
|
|
|
// adapted to use that, and that normalize line can go away
|
2018-07-09 14:26:22 -05:00
|
|
|
|
2020-09-07 19:32:09 -05:00
|
|
|
// compile-flags:--test --test-args --test-threads=1
|
2019-07-20 15:34:41 -05:00
|
|
|
// rustc-env:RUST_BACKTRACE=0
|
2018-07-16 16:25:34 -05:00
|
|
|
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
|
2018-07-19 20:57:15 -05:00
|
|
|
// failure-status: 101
|
2018-07-09 14:26:22 -05:00
|
|
|
|
2018-07-16 16:25:34 -05:00
|
|
|
// doctest fails at runtime
|
2018-07-09 14:26:22 -05:00
|
|
|
/// ```
|
2019-05-04 14:37:12 -05:00
|
|
|
/// println!("stdout 1");
|
|
|
|
/// eprintln!("stderr 1");
|
|
|
|
/// println!("stdout 2");
|
|
|
|
/// eprintln!("stderr 2");
|
2018-07-09 14:26:22 -05:00
|
|
|
/// panic!("oh no");
|
|
|
|
/// ```
|
|
|
|
pub struct SomeStruct;
|
2018-07-09 19:11:06 -05:00
|
|
|
|
2018-07-16 16:25:34 -05:00
|
|
|
// doctest fails at compile time
|
2018-07-09 19:11:06 -05:00
|
|
|
/// ```
|
|
|
|
/// no
|
|
|
|
/// ```
|
|
|
|
pub struct OtherStruct;
|