-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test for the shortness format in rustdoc
- Loading branch information
1 parent
360f8f8
commit 716d2cd
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// compile-flags:--test --error-format=short | ||
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" | ||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" | ||
// failure-status: 101 | ||
|
||
/// ```rust | ||
/// foo(); | ||
/// ``` | ||
//~^^ ERROR cannot find function `foo` in this scope | ||
fn foo() { | ||
println!("Hello, world!"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
running 1 test | ||
test $DIR/issue-81662-shortness.rs - foo (line 6) ... FAILED | ||
|
||
failures: | ||
|
||
---- $DIR/issue-81662-shortness.rs - foo (line 6) stdout ---- | ||
$DIR/issue-81662-shortness.rs:7:1: error[E0425]: cannot find function `foo` in this scope | ||
error: aborting due to previous error | ||
Couldn't compile the test. | ||
|
||
failures: | ||
$DIR/issue-81662-shortness.rs - foo (line 6) | ||
|
||
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME | ||
|