提交 b531a7f5 编写于 作者: G Guillaume Gomez

Add test for --display-doctest-warnings option

上级 3a8fcff9
// check-pass
// compile-flags:-Zunstable-options --display-doctest-warnings --test
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
/// ```
/// let x = 12;
/// ```
pub fn foo() {}
running 1 test
test $DIR/display-output.rs - foo (line 6) ... ok
successes:
---- $DIR/display-output.rs - foo (line 6) stdout ----
warning: unused variable: `x`
--> $DIR/display-output.rs:7:5
|
LL | let x = 12;
| ^ help: if this is intentional, prefix it with an underscore: `_x`
|
= note: `#[warn(unused_variables)]` on by default
warning: 1 warning emitted
successes:
$DIR/display-output.rs - foo (line 6)
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册