Skip to content

Commit

Permalink
add failure-status to rustdoc doctest ui test
Browse files Browse the repository at this point in the history
  • Loading branch information
QuietMisdreavus committed Jul 20, 2018
1 parent d965371 commit d3569d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/test/rustdoc-ui/failed-doctest-output.rs
Expand Up @@ -14,6 +14,7 @@

// compile-flags:--test
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
// failure-status: 101

// doctest fails at runtime
/// ```
Expand Down
18 changes: 9 additions & 9 deletions src/test/rustdoc-ui/failed-doctest-output.stdout
@@ -1,22 +1,22 @@

running 2 tests
test $DIR/failed-doctest-output.rs - OtherStruct (line 25) ... FAILED
test $DIR/failed-doctest-output.rs - SomeStruct (line 19) ... FAILED
test $DIR/failed-doctest-output.rs - OtherStruct (line 26) ... FAILED
test $DIR/failed-doctest-output.rs - SomeStruct (line 20) ... FAILED

failures:

---- $DIR/failed-doctest-output.rs - OtherStruct (line 25) stdout ----
---- $DIR/failed-doctest-output.rs - OtherStruct (line 26) stdout ----
error[E0425]: cannot find value `no` in this scope
--> $DIR/failed-doctest-output.rs:26:1
--> $DIR/failed-doctest-output.rs:27:1
|
3 | no
| ^^ not found in this scope

thread '$DIR/failed-doctest-output.rs - OtherStruct (line 25)' panicked at 'couldn't compile the test', librustdoc/test.rs:332:13
thread '$DIR/failed-doctest-output.rs - OtherStruct (line 26)' panicked at 'couldn't compile the test', librustdoc/test.rs:332:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.

---- $DIR/failed-doctest-output.rs - SomeStruct (line 19) stdout ----
thread '$DIR/failed-doctest-output.rs - SomeStruct (line 19)' panicked at 'test executable failed:
---- $DIR/failed-doctest-output.rs - SomeStruct (line 20) stdout ----
thread '$DIR/failed-doctest-output.rs - SomeStruct (line 20)' panicked at 'test executable failed:

thread 'main' panicked at 'oh no', $DIR/failed-doctest-output.rs:3:1
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Expand All @@ -25,8 +25,8 @@ note: Run with `RUST_BACKTRACE=1` for a backtrace.


failures:
$DIR/failed-doctest-output.rs - OtherStruct (line 25)
$DIR/failed-doctest-output.rs - SomeStruct (line 19)
$DIR/failed-doctest-output.rs - OtherStruct (line 26)
$DIR/failed-doctest-output.rs - SomeStruct (line 20)

test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out

0 comments on commit d3569d2

Please sign in to comment.