From fc97fbeef3cbd21d94a321faead3ee64b1a14a61 Mon Sep 17 00:00:00 2001 From: François Mockers Date: Mon, 5 Jul 2021 01:30:48 +0200 Subject: add mcve as test --- src/test/rustdoc/auxiliary/issue-86620-1.rs | 11 +++++++++++ src/test/rustdoc/issue-86620.rs | 8 ++++++++ 2 files changed, 19 insertions(+) create mode 100644 src/test/rustdoc/auxiliary/issue-86620-1.rs create mode 100644 src/test/rustdoc/issue-86620.rs (limited to 'src/test/rustdoc') diff --git a/src/test/rustdoc/auxiliary/issue-86620-1.rs b/src/test/rustdoc/auxiliary/issue-86620-1.rs new file mode 100644 index 00000000000..f6debf6fb4e --- /dev/null +++ b/src/test/rustdoc/auxiliary/issue-86620-1.rs @@ -0,0 +1,11 @@ +#![crate_name = "issue_86620_1"] + +pub trait VZip { + fn vzip() -> usize; +} + +impl VZip for T { + fn vzip() -> usize { + 0 + } +} diff --git a/src/test/rustdoc/issue-86620.rs b/src/test/rustdoc/issue-86620.rs new file mode 100644 index 00000000000..2703cac0dc3 --- /dev/null +++ b/src/test/rustdoc/issue-86620.rs @@ -0,0 +1,8 @@ +// aux-build:issue-86620-1.rs + +extern crate issue_86620_1; + +use issue_86620_1::*; + +// @!has issue_86620/struct.S.html '//div[@id="method.vzip"]//a[@class="fnname"]/@href' #tymethod.vzip +pub struct S; -- cgit 1.4.1-3-g733a5 From 441a350e2c15f88b550921f911edc9e039164f15 Mon Sep 17 00:00:00 2001 From: François Mockers Date: Mon, 5 Jul 2021 02:09:20 +0200 Subject: add check on anchor link --- src/test/rustdoc/issue-86620.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/test/rustdoc') diff --git a/src/test/rustdoc/issue-86620.rs b/src/test/rustdoc/issue-86620.rs index 2703cac0dc3..b14e266f7f9 100644 --- a/src/test/rustdoc/issue-86620.rs +++ b/src/test/rustdoc/issue-86620.rs @@ -5,4 +5,5 @@ extern crate issue_86620_1; use issue_86620_1::*; // @!has issue_86620/struct.S.html '//div[@id="method.vzip"]//a[@class="fnname"]/@href' #tymethod.vzip +// @has issue_86620/struct.S.html '//div[@id="method.vzip"]//a[@class="anchor"]/@href' #method.vzip pub struct S; -- cgit 1.4.1-3-g733a5 From 450c28a45e387fb54bbc84cf88c3556f93bcf1b8 Mon Sep 17 00:00:00 2001 From: François Mockers Date: Thu, 15 Jul 2021 00:30:11 +0200 Subject: add assertions on existing tests with missing doc source --- src/test/rustdoc/extern-default-method.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/test/rustdoc') diff --git a/src/test/rustdoc/extern-default-method.rs b/src/test/rustdoc/extern-default-method.rs index 810c591c53e..efa2025b4b9 100644 --- a/src/test/rustdoc/extern-default-method.rs +++ b/src/test/rustdoc/extern-default-method.rs @@ -4,4 +4,6 @@ extern crate rustdoc_extern_default_method as ext; // @count extern_default_method/struct.Struct.html '//*[@id="method.provided"]' 1 +// @has extern_default_method/struct.Struct.html '//div[@id="method.provided"]//a[@class="fnname"]/@href' #method.provided +// @has extern_default_method/struct.Struct.html '//div[@id="method.provided"]//a[@class="anchor"]/@href' #method.provided pub use ext::Struct; -- cgit 1.4.1-3-g733a5