about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/rustdoc-gui/check-stab-in-docblock.goml14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/rustdoc-gui/check-stab-in-docblock.goml b/tests/rustdoc-gui/check-stab-in-docblock.goml
index f25c88690e5..916bea6b069 100644
--- a/tests/rustdoc-gui/check-stab-in-docblock.goml
+++ b/tests/rustdoc-gui/check-stab-in-docblock.goml
@@ -1,5 +1,5 @@
 // This test checks that using `.stab` attributes in `.docblock` elements doesn't
-// create scrollable paragraphs.
+// create scrollable paragraphs and is correctly displayed (not making weird blocks).
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
 // Needs the text to be display to check for scrollable content.
 show-text: true
@@ -31,3 +31,15 @@ assert-property: (
     ".top-doc .docblock p:nth-of-type(3)",
     {"scrollHeight": |clientHeight|, "scrollWidth": |clientWidth|},
 )
+
+// Ensure that `<code>` elements in code don't make big blocks.
+compare-elements-size-near: (
+    "#reexport\.TheStdReexport > code",
+    ".docblock p span[data-span='1']",
+    {"height": 1},
+)
+compare-elements-size-near: (
+    "#reexport\.TheStdReexport > code",
+    ".docblock p span[data-span='2']",
+    {"height": 1},
+)