We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99ed7ea commit 2c704d8Copy full SHA for 2c704d8
tests/testsuite/doc.rs
@@ -1450,3 +1450,21 @@ fn doc_message_format() {
1450
),
1451
);
1452
}
1453
+
1454
+#[test]
1455
+fn short_message_format() {
1456
+ if !is_nightly() {
1457
+ // This can be removed once 1.30 is stable (rustdoc --error-format stabilized).
1458
+ return;
1459
+ }
1460
+ let p = project().file("src/lib.rs", BAD_INTRA_LINK_LIB).build();
1461
+ assert_that(
1462
+ p.cargo("doc --message-format=short"),
1463
+ execs().with_status(101).with_stderr_contains(
1464
+ "\
1465
+src/lib.rs:4:6: error: `[bad_link]` cannot be resolved, ignoring it...
1466
+error: Could not document `foo`.
1467
+",
1468
+ ),
1469
+ );
1470
+}
0 commit comments