diff options
| author | Stefan Schindler <dns2utf8@estada.ch> | 2021-06-16 16:16:11 +0200 |
|---|---|---|
| committer | Stefan Schindler <dns2utf8@estada.ch> | 2021-06-24 16:46:15 +0200 |
| commit | e2efcf10de7569f6b441be662b350b4f0a7de34d (patch) | |
| tree | 69eb121a087f096aac85cc701e943e014a42593d | |
| parent | 6020c79ddeafe8d9760b27c14c39da81bac9b4a6 (diff) | |
| download | rust-e2efcf10de7569f6b441be662b350b4f0a7de34d.tar.gz rust-e2efcf10de7569f6b441be662b350b4f0a7de34d.zip | |
Fixing the test rustdoc by ignoring `*[@id="module-item"]//following-sibling::item-right` relationship and rustdoc-gui
| -rw-r--r-- | src/etc/htmldocck.py | 1 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/sidebar.goml | 10 | ||||
| -rw-r--r-- | src/test/rustdoc/short-docblock-codeblock.rs | 6 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/etc/htmldocck.py b/src/etc/htmldocck.py index 8647db5a45d..681520a1daf 100644 --- a/src/etc/htmldocck.py +++ b/src/etc/htmldocck.py @@ -365,6 +365,7 @@ def check_tree_attr(tree, path, attr, pat, regexp): def check_tree_text(tree, path, pat, regexp): path = normalize_xpath(path) + print("normalize_xpath -> {}".format(path)) ret = False try: for e in tree.findall(path): diff --git a/src/test/rustdoc-gui/sidebar.goml b/src/test/rustdoc-gui/sidebar.goml index 4f6b3aded18..c8ebb8c56f5 100644 --- a/src/test/rustdoc-gui/sidebar.goml +++ b/src/test/rustdoc-gui/sidebar.goml @@ -13,8 +13,8 @@ assert-text: (".sidebar-elems > .items > ul > li:nth-child(4)", "Traits") assert-text: (".sidebar-elems > .items > ul > li:nth-child(5)", "Functions") assert-text: (".sidebar-elems > .items > ul > li:nth-child(6)", "Type Definitions") assert-text: (".sidebar-elems > .items > ul > li:nth-child(7)", "Keywords") -assert-text: ("#structs + table td > a", "Foo") -click: "#structs + table td > a" +assert-text: ("#structs + .item-table .item-left > a", "Foo") +click: "#structs + .item-table .item-left > a" // PAGE: struct.Foo.html assert-count: (".sidebar .location", 2) @@ -35,8 +35,8 @@ assert-text: (".sidebar-elems > .items > ul > li:nth-child(2)", "Structs") assert-text: (".sidebar-elems > .items > ul > li:nth-child(3)", "Traits") assert-text: (".sidebar-elems > .items > ul > li:nth-child(4)", "Functions") assert-text: (".sidebar-elems > .items > ul > li:nth-child(5)", "Type Definitions") -assert-text: ("#functions + table td > a", "foobar") -click: "#functions + table td > a" +assert-text: ("#functions + .item-table .item-left > a", "foobar") +click: "#functions + .item-table .item-left > a" // PAGE: fn.foobar.html // In items containing no items (like functions or constants) and in modules, we have one @@ -57,4 +57,4 @@ assert-text: (".sidebar > .location", "Module sub_sub_module") // We check that we don't have the crate list. assert-false: ".sidebar-elems > .crate" assert-text: (".sidebar-elems > .items > ul > li:nth-child(1)", "Functions") -assert-text: ("#functions + table td > a", "foo") +assert-text: ("#functions + .item-table .item-left > a", "foo") diff --git a/src/test/rustdoc/short-docblock-codeblock.rs b/src/test/rustdoc/short-docblock-codeblock.rs index 9e792e181cd..13b7f0c19a7 100644 --- a/src/test/rustdoc/short-docblock-codeblock.rs +++ b/src/test/rustdoc/short-docblock-codeblock.rs @@ -1,8 +1,8 @@ #![crate_name = "foo"] -// @has foo/index.html '//*[@class="module-item"]//following-sibling::item-right[@class="docblock-short"]' "" -// @!has foo/index.html '//*[@id="module-item"]//following-sibling::item-right[@class="docblock-short"]' "Some text." -// @!has foo/index.html '//*[@id="module-item"]//following-sibling::item-right[@class="docblock-short"]' "let x = 12;" +// @has foo/index.html '//item-right[@class="docblock-short"]' "" +// @!has foo/index.html '//item-right[@class="docblock-short"]' "Some text." +// @!has foo/index.html '//item-right[@class="docblock-short"]' "let x = 12;" /// ``` /// let x = 12; |
