Add test for rustdoc --nocapture option

This commit is contained in:
Guillaume Gomez 2021-06-11 22:11:35 +02:00 committed by Guillaume Gomez
parent 6ca0e5ed39
commit 111cca1fa7
3 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,10 @@
// check-pass
// compile-flags:--test -Zunstable-options --nocapture
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
/// ```
/// println!("hello!");
/// eprintln!("stderr");
/// ```
pub struct Foo;

View file

@ -0,0 +1 @@
stderr

View file

@ -0,0 +1,7 @@
running 1 test
hello!
test $DIR/nocapture.rs - Foo (line 6) ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME