Skip to content

Commit 0e3fc03

Browse files
Add test for rustdoc --nocapture option
1 parent d4238ee commit 0e3fc03

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

src/test/rustdoc-ui/nocapture.rs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// check-pass
2+
// compile-flags:--test -Zunstable-options --nocapture
3+
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
4+
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
5+
6+
/// ```
7+
/// println!("hello!");
8+
/// eprintln!("stderr");
9+
/// ```
10+
pub struct Foo;

src/test/rustdoc-ui/nocapture.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
stderr

src/test/rustdoc-ui/nocapture.stdout

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

0 commit comments

Comments
 (0)