]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-gui/scrape-examples-layout.goml
Rollup merge of #105661 - lcnr:evaluate-new, r=compiler-errors
[rust.git] / src / test / rustdoc-gui / scrape-examples-layout.goml
1 // Check that the line number column has the correct layout.
2 goto: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"
3
4 // Check that it's not zero.
5 assert-property-false: (
6     ".more-scraped-examples .scraped-example .code-wrapper .src-line-numbers",
7     {"clientWidth": "0"}
8 )
9
10 // Check that examples with very long lines have the same width as ones that don't.
11 store-property: (
12     clientWidth,
13     ".more-scraped-examples .scraped-example:nth-child(2) .code-wrapper .src-line-numbers",
14     "clientWidth"
15 )
16
17 assert-property: (
18     ".more-scraped-examples .scraped-example:nth-child(3) .code-wrapper .src-line-numbers",
19     {"clientWidth": |clientWidth|}
20 )
21
22 assert-property: (
23     ".more-scraped-examples .scraped-example:nth-child(4) .code-wrapper .src-line-numbers",
24     {"clientWidth": |clientWidth|}
25 )
26
27 assert-property: (
28     ".more-scraped-examples .scraped-example:nth-child(5) .code-wrapper .src-line-numbers",
29     {"clientWidth": |clientWidth|}
30 )
31
32 assert-property: (
33     ".more-scraped-examples .scraped-example:nth-child(6) .code-wrapper .src-line-numbers",
34     {"clientWidth": |clientWidth|}
35 )