diff options
| author | QuietMisdreavus <grey@quietmisdreavus.net> | 2018-07-16 16:25:34 -0500 |
|---|---|---|
| committer | QuietMisdreavus <grey@quietmisdreavus.net> | 2018-07-20 10:13:38 -0500 |
| commit | d965371d8654836183fe323ca461b1100e970baf (patch) | |
| tree | 929cf0261a26e255d24bbd514ac2fc2f51418225 | |
| parent | ffbd2b931e97e3831ea5089a3309829639a5d45b (diff) | |
| download | rust-d965371d8654836183fe323ca461b1100e970baf.tar.gz rust-d965371d8654836183fe323ca461b1100e970baf.zip | |
normalize test output so it can be run from repo root
| -rw-r--r-- | src/test/rustdoc-ui/failed-doctest-output.rs | 6 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/failed-doctest-output.stdout | 18 |
2 files changed, 14 insertions, 10 deletions
diff --git a/src/test/rustdoc-ui/failed-doctest-output.rs b/src/test/rustdoc-ui/failed-doctest-output.rs index 21d3d94714a..62cda9cb86b 100644 --- a/src/test/rustdoc-ui/failed-doctest-output.rs +++ b/src/test/rustdoc-ui/failed-doctest-output.rs @@ -9,15 +9,19 @@ // except according to those terms. // Issue #51162: A failed doctest was not printing its stdout/stderr +// FIXME: if/when the output of the test harness can be tested on its own, this test should be +// adapted to use that, and that normalize line can go away // compile-flags:--test -// disable-ui-testing-normalization +// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" +// doctest fails at runtime /// ``` /// panic!("oh no"); /// ``` pub struct SomeStruct; +// doctest fails at compile time /// ``` /// no /// ``` diff --git a/src/test/rustdoc-ui/failed-doctest-output.stdout b/src/test/rustdoc-ui/failed-doctest-output.stdout index e860079eb81..2ae633de12e 100644 --- a/src/test/rustdoc-ui/failed-doctest-output.stdout +++ b/src/test/rustdoc-ui/failed-doctest-output.stdout @@ -1,22 +1,22 @@ running 2 tests -test $DIR/failed-doctest-output.rs - OtherStruct (line 21) ... FAILED -test $DIR/failed-doctest-output.rs - SomeStruct (line 16) ... FAILED +test $DIR/failed-doctest-output.rs - OtherStruct (line 25) ... FAILED +test $DIR/failed-doctest-output.rs - SomeStruct (line 19) ... FAILED failures: ----- $DIR/failed-doctest-output.rs - OtherStruct (line 21) stdout ---- +---- $DIR/failed-doctest-output.rs - OtherStruct (line 25) stdout ---- error[E0425]: cannot find value `no` in this scope - --> $DIR/failed-doctest-output.rs:22:1 + --> $DIR/failed-doctest-output.rs:26:1 | 3 | no | ^^ not found in this scope -thread '$DIR/failed-doctest-output.rs - OtherStruct (line 21)' panicked at 'couldn't compile the test', librustdoc/test.rs:332:13 +thread '$DIR/failed-doctest-output.rs - OtherStruct (line 25)' 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 16) stdout ---- -thread '$DIR/failed-doctest-output.rs - SomeStruct (line 16)' panicked at 'test executable failed: +---- $DIR/failed-doctest-output.rs - SomeStruct (line 19) stdout ---- +thread '$DIR/failed-doctest-output.rs - SomeStruct (line 19)' 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. @@ -25,8 +25,8 @@ note: Run with `RUST_BACKTRACE=1` for a backtrace. failures: - $DIR/failed-doctest-output.rs - OtherStruct (line 21) - $DIR/failed-doctest-output.rs - SomeStruct (line 16) + $DIR/failed-doctest-output.rs - OtherStruct (line 25) + $DIR/failed-doctest-output.rs - SomeStruct (line 19) test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out |
