Skip to content

Commit

Permalink
Add a test for "cargo doc --message-format=short"
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Aug 10, 2018
1 parent 99ed7ea commit 2c704d8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/testsuite/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1450,3 +1450,21 @@ fn doc_message_format() {
),
);
}

#[test]
fn short_message_format() {
if !is_nightly() {
// This can be removed once 1.30 is stable (rustdoc --error-format stabilized).
return;
}
let p = project().file("src/lib.rs", BAD_INTRA_LINK_LIB).build();
assert_that(
p.cargo("doc --message-format=short"),
execs().with_status(101).with_stderr_contains(
"\
src/lib.rs:4:6: error: `[bad_link]` cannot be resolved, ignoring it...
error: Could not document `foo`.
",
),
);
}

0 comments on commit 2c704d8

Please sign in to comment.