Skip to content

Commit ae66380

Browse files
Add GUI regression test for code in doc blocks
1 parent dd3dc10 commit ae66380

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/rustdoc-gui/check-stab-in-docblock.goml

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This test checks that using `.stab` attributes in `.docblock` elements doesn't
2-
// create scrollable paragraphs.
2+
// create scrollable paragraphs and is correctly displayed (not making weird blocks).
33
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
44
// Needs the text to be display to check for scrollable content.
55
show-text: true
@@ -31,3 +31,15 @@ assert-property: (
3131
".top-doc .docblock p:nth-of-type(3)",
3232
{"scrollHeight": |clientHeight|, "scrollWidth": |clientWidth|},
3333
)
34+
35+
// Ensure that `<code>` elements in code don't make big blocks.
36+
compare-elements-size-near: (
37+
"#reexport\.TheStdReexport > code",
38+
".docblock p span[data-span='1']",
39+
{"height": 1},
40+
)
41+
compare-elements-size-near: (
42+
"#reexport\.TheStdReexport > code",
43+
".docblock p span[data-span='2']",
44+
{"height": 1},
45+
)

0 commit comments

Comments
 (0)