summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-gui/code-tags.goml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/rustdoc-gui/code-tags.goml
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc-gui/code-tags.goml')
-rw-r--r--tests/rustdoc-gui/code-tags.goml24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/rustdoc-gui/code-tags.goml b/tests/rustdoc-gui/code-tags.goml
new file mode 100644
index 000000000..8561f537f
--- /dev/null
+++ b/tests/rustdoc-gui/code-tags.goml
@@ -0,0 +1,24 @@
+// This test ensures that items and documentation code blocks are wrapped in <pre><code>
+
+// We need to disable this check because `implementors/test_docs/trait.AnotherOne.js`
+// doesn't exist.
+fail-on-request-error: false
+goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
+size: (1080, 600)
+// There should be four doc codeblocks.
+// Check that their content is inside <pre><code>
+assert-count: (".example-wrap pre > code", 4)
+// Check that function signature is inside <pre><code>
+assert: ".item-decl pre.rust > code"
+
+goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
+assert: ".item-decl pre.rust > code"
+
+goto: "file://" + |DOC_PATH| + "/test_docs/enum.AnEnum.html"
+assert: ".item-decl pre.rust > code"
+
+goto: "file://" + |DOC_PATH| + "/test_docs/trait.AnotherOne.html"
+assert: ".item-decl pre.rust > code"
+
+goto: "file://" + |DOC_PATH| + "/test_docs/type.SomeType.html"
+assert: ".item-decl pre.rust > code"