diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-11-14 16:40:48 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-12-05 15:59:40 +0100 |
| commit | 42fcba7a6731ec2a0fc6e75383fbd35dd75db41d (patch) | |
| tree | f118d05d4126c973c1a28181c949324f5c37a11d /tests/rustdoc | |
| parent | a4e5e074ac0dfb478c362af2dc37a9e333d86547 (diff) | |
| download | rust-42fcba7a6731ec2a0fc6e75383fbd35dd75db41d.tar.gz rust-42fcba7a6731ec2a0fc6e75383fbd35dd75db41d.zip | |
Add tests for headings anchor and links in headings
Diffstat (limited to 'tests/rustdoc')
| -rw-r--r-- | tests/rustdoc/links-in-headings.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/rustdoc/links-in-headings.rs b/tests/rustdoc/links-in-headings.rs new file mode 100644 index 00000000000..c5bee1a7975 --- /dev/null +++ b/tests/rustdoc/links-in-headings.rs @@ -0,0 +1,14 @@ +#![crate_name = "foo"] + +//! # Heading with [a link](https://a.com) inside +//! +//! And even with +//! +//! ## [multiple](https://b.com) [links](https://c.com) +//! +//! ! + +// @has 'foo/index.html' +// @has - '//h2/a[@href="https://a.com"]' 'a link' +// @has - '//h3/a[@href="https://b.com"]' 'multiple' +// @has - '//h3/a[@href="https://c.com"]' 'links' |
