Skip to content

Commit 57f7501

Browse files
Add test to check width of item-info
1 parent d10703c commit 57f7501

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// This test ensures that the item information don't take 100% of the width if unnecessary.
2+
goto: file://|DOC_PATH|/lib2/struct.Foo.html
3+
// We set a fixed size so there is no chance of "random" resize.
4+
size: (1100, 800)
5+
// We check that ".item-info" is bigger than its content.
6+
assert-css: (".item-info", {"width": "807px"})
7+
assert-css: (".item-info .stab", {"width": "343px"})

src/test/rustdoc-gui/src/lib2/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// ignore-tidy-linelength
22

3+
#![feature(doc_cfg)]
4+
35
pub mod module {
46
pub mod sub_module {
57
pub mod sub_sub_module {
@@ -14,6 +16,7 @@ pub fn foobar() {}
1416

1517
pub type Alias = u32;
1618

19+
#[doc(cfg(feature = "foo-method"))]
1720
pub struct Foo {
1821
pub x: Alias,
1922
}

0 commit comments

Comments
 (0)