diff options
| author | Michael Howell <michael@notriddle.com> | 2021-06-18 17:47:05 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2021-06-18 17:47:05 -0700 |
| commit | f67585d494fd92347e4954a240ddde14dcbd711b (patch) | |
| tree | 5d80cf92f220950d530533abfcb2d6337d1a8079 /src/librustdoc/html | |
| parent | 20915d471a523ac8f489461e741098d38dae136f (diff) | |
| download | rust-f67585d494fd92347e4954a240ddde14dcbd711b.tar.gz rust-f67585d494fd92347e4954a240ddde14dcbd711b.zip | |
Update test cases for intra-doc links in summaries
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/markdown/tests.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librustdoc/html/markdown/tests.rs b/src/librustdoc/html/markdown/tests.rs index ac3ea4c8c5f..d10da64ccfa 100644 --- a/src/librustdoc/html/markdown/tests.rs +++ b/src/librustdoc/html/markdown/tests.rs @@ -221,7 +221,7 @@ fn test_header_ids_multiple_blocks() { #[test] fn test_short_markdown_summary() { fn t(input: &str, expect: &str) { - let output = short_markdown_summary(input); + let output = short_markdown_summary(input, &[][..]); assert_eq!(output, expect, "original: {}", input); } @@ -232,6 +232,7 @@ fn test_short_markdown_summary() { t("Hard-break \nsummary", "Hard-break summary"); t("hello [Rust] :)\n\n[Rust]: https://www.rust-lang.org", "hello Rust :)"); t("hello [Rust](https://www.rust-lang.org \"Rust\") :)", "hello Rust :)"); + t("dud [link]", "dud [link]"); t("code `let x = i32;` ...", "code <code>let x = i32;</code> …"); t("type `Type<'static>` ...", "type <code>Type<'static></code> …"); t("# top header", "top header"); @@ -259,6 +260,7 @@ fn test_plain_text_summary() { t("Hard-break \nsummary", "Hard-break summary"); t("hello [Rust] :)\n\n[Rust]: https://www.rust-lang.org", "hello Rust :)"); t("hello [Rust](https://www.rust-lang.org \"Rust\") :)", "hello Rust :)"); + t("dud [link]", "dud [link]"); t("code `let x = i32;` ...", "code `let x = i32;` …"); t("type `Type<'static>` ...", "type `Type<'static>` …"); t("# top header", "top header"); |
