Add test for rustdoc --nocapture option
This commit is contained in:
parent
6ca0e5ed39
commit
111cca1fa7
3 changed files with 18 additions and 0 deletions
10
src/test/rustdoc-ui/nocapture.rs
Normal file
10
src/test/rustdoc-ui/nocapture.rs
Normal 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;
|
1
src/test/rustdoc-ui/nocapture.stderr
Normal file
1
src/test/rustdoc-ui/nocapture.stderr
Normal file
|
@ -0,0 +1 @@
|
|||
stderr
|
7
src/test/rustdoc-ui/nocapture.stdout
Normal file
7
src/test/rustdoc-ui/nocapture.stdout
Normal 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
|
||||
|
Loading…
Reference in a new issue