diff options
| author | ozkanonur <work@onurozkan.dev> | 2023-05-20 14:41:37 +0300 |
|---|---|---|
| committer | ozkanonur <work@onurozkan.dev> | 2023-05-20 14:41:37 +0300 |
| commit | 02ea750f0bf5b85c1b11f45c22aa8eccdcfcc57d (patch) | |
| tree | 3672eb22b75b83aff610f55b8a0ba39a800bad51 | |
| parent | 6a347322a9dcb44967020da98c3f9e9e22f38e17 (diff) | |
| download | rust-02ea750f0bf5b85c1b11f45c22aa8eccdcfcc57d.tar.gz rust-02ea750f0bf5b85c1b11f45c22aa8eccdcfcc57d.zip | |
add compiletest headers to rustdoc-gui tests
| -rw-r--r-- | tests/rustdoc-gui/source-anchor-scroll.goml | 8 | ||||
| -rw-r--r-- | tests/rustdoc-gui/src/extend_css/lib.rs | 1 | ||||
| -rw-r--r-- | tests/rustdoc-gui/src/link_to_definition/lib.rs | 1 | ||||
| -rw-r--r-- | tests/rustdoc-gui/src/scrape_examples/src/lib.rs | 1 |
4 files changed, 7 insertions, 4 deletions
diff --git a/tests/rustdoc-gui/source-anchor-scroll.goml b/tests/rustdoc-gui/source-anchor-scroll.goml index 3d88d5619b1..67f1497e70c 100644 --- a/tests/rustdoc-gui/source-anchor-scroll.goml +++ b/tests/rustdoc-gui/source-anchor-scroll.goml @@ -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"}) diff --git a/tests/rustdoc-gui/src/extend_css/lib.rs b/tests/rustdoc-gui/src/extend_css/lib.rs index 3a3babf8984..2308c0932fd 100644 --- a/tests/rustdoc-gui/src/extend_css/lib.rs +++ b/tests/rustdoc-gui/src/extend_css/lib.rs @@ -1 +1,2 @@ +// compile-flags: --extend-css extra.css //! <div class="extend">text in red</div> diff --git a/tests/rustdoc-gui/src/link_to_definition/lib.rs b/tests/rustdoc-gui/src/link_to_definition/lib.rs index 419a9cceec5..6fed79aedb8 100644 --- a/tests/rustdoc-gui/src/link_to_definition/lib.rs +++ b/tests/rustdoc-gui/src/link_to_definition/lib.rs @@ -1,3 +1,4 @@ +// compile-flags: -Zunstable-options --generate-link-to-definition pub fn sub_fn() { barbar(); } diff --git a/tests/rustdoc-gui/src/scrape_examples/src/lib.rs b/tests/rustdoc-gui/src/scrape_examples/src/lib.rs index 88b03cf2603..6666587ad54 100644 --- a/tests/rustdoc-gui/src/scrape_examples/src/lib.rs +++ b/tests/rustdoc-gui/src/scrape_examples/src/lib.rs @@ -1,3 +1,4 @@ +// run-flags:-Zrustdoc-scrape-examples /// # Examples /// /// ``` |
