From 42fcba7a6731ec2a0fc6e75383fbd35dd75db41d Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 14 Nov 2023 16:40:48 +0100 Subject: Add tests for headings anchor and links in headings --- tests/rustdoc/links-in-headings.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/rustdoc/links-in-headings.rs (limited to 'tests/rustdoc') 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' -- cgit 1.4.1-3-g733a5