]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-ui/failed-doctest-output-windows.rs
Rollup merge of #107779 - compiler-errors:issue-107775, r=jackh726
[rust.git] / tests / rustdoc-ui / failed-doctest-output-windows.rs
1 // only-windows
2 // There's a parallel generic version of this test for non-windows platforms.
3
4 // Issue #51162: A failed doctest was not printing its stdout/stderr
5 // FIXME: if/when the output of the test harness can be tested on its own, this test should be
6 // adapted to use that, and that normalize line can go away
7
8 // compile-flags:--test --test-args --test-threads=1
9 // rustc-env:RUST_BACKTRACE=0
10 // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
11 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
12 // failure-status: 101
13
14 // doctest fails at runtime
15 /// ```
16 /// println!("stdout 1");
17 /// eprintln!("stderr 1");
18 /// println!("stdout 2");
19 /// eprintln!("stderr 2");
20 /// panic!("oh no");
21 /// ```
22 pub struct SomeStruct;
23
24 // doctest fails at compile time
25 /// ```
26 /// no
27 /// ```
28 pub struct OtherStruct;