Add regression test for stab display in doc blocks

This commit is contained in:
Guillaume Gomez 2024-07-20 22:28:27 +02:00
parent ee034f4912
commit e4d701b1d3
2 changed files with 13 additions and 4 deletions

View File

@ -20,10 +20,10 @@ Also, stop using `bar` as it's <span class="stab deprecated" title="">deprecated
Also, stop using `bar` as it's <span class="stab deprecated" title="">deprecated</span>.
Also, stop using `bar` as it's <span class="stab deprecated" title="">deprecated</span>.
Finally, you can use `quz` only on <span class="stab portability"><code>Unix or x86-64</code>
</span>.
Finally, you can use `quz` only on <span class="stab portability"><code>Unix or x86-64</code>
</span>.
Finally, you can use `quz` only on <span class="stab portability" data-span="1"><code>Unix or x86-64
</code></span>.
Finally, you can use `quz` only on <span class="stab portability" data-span="2"><code>Unix or x86-64
</code></span>.
*/
use std::convert::AsRef;

View File

@ -0,0 +1,9 @@
// This test ensure that `stab` elements if used in doc blocks are not breaking the text layout.
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
// We make the window wide enough for the two stabs who are looking into to be on the same line.
set-window-size: (1100, 600)
compare-elements-position: (
".top-doc .docblock span[data-span='1']",
".top-doc .docblock span[data-span='2']",
["y"],
)