add compiletest headers to rustdoc-gui tests

This commit is contained in:
ozkanonur 2023-05-20 14:41:37 +03:00
parent 6a347322a9
commit 02ea750f0b
4 changed files with 7 additions and 4 deletions

View File

@ -8,13 +8,13 @@ set-window-size: (600, 800)
assert-property: ("html", {"scrollTop": "0"})
click: '//a[text() = "barbar"]'
assert-property: ("html", {"scrollTop": "125"})
assert-property: ("html", {"scrollTop": "149"})
click: '//a[text() = "bar"]'
assert-property: ("html", {"scrollTop": "156"})
assert-property: ("html", {"scrollTop": "180"})
click: '//a[text() = "sub_fn"]'
assert-property: ("html", {"scrollTop": "53"})
assert-property: ("html", {"scrollTop": "77"})
// We now check that clicking on lines doesn't change the scroll
// Extra information: the "sub_fn" function header is on line 1.
click: '//*[@id="6"]'
assert-property: ("html", {"scrollTop": "53"})
assert-property: ("html", {"scrollTop": "77"})

View File

@ -1 +1,2 @@
// compile-flags: --extend-css extra.css
//! <div class="extend">text in red</div>

View File

@ -1,3 +1,4 @@
// compile-flags: -Zunstable-options --generate-link-to-definition
pub fn sub_fn() {
barbar();
}

View File

@ -1,3 +1,4 @@
// run-flags:-Zrustdoc-scrape-examples
/// # Examples
///
/// ```