Skip to content

Commit 9d13058

Browse files
Add GUI test for long inline cfg labels display
1 parent 75cc2b8 commit 9d13058

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

tests/rustdoc-gui/label-next-to-symbol.goml

+11-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ compare-elements-position: (
3737
("y"),
3838
)
3939

40-
4140
// Mobile view
4241
set-window-size: (600, 600)
4342
// staggered layout with 2em spacing
@@ -64,3 +63,14 @@ compare-elements-position-false: (
6463
"//*[@class='desc docblock-short'][text()='a thing with a label']",
6564
("y"),
6665
)
66+
67+
// Ensure it doesn't expand.
68+
set-window-size: (800, 800)
69+
go-to: "file://" + |DOC_PATH| + "/test_docs/cfgs/index.html"
70+
// This part of the tags should not be on the same line as the beginning since the width
71+
// is too small for that.
72+
compare-elements-position-false: (
73+
"//*[@class='stab portability']/code[text()='appservice-api-c']",
74+
"//*[@class='stab portability']/code[text()='server']",
75+
("y"),
76+
)

tests/rustdoc-gui/src/test_docs/lib.rs

+9
Original file line numberDiff line numberDiff line change
@@ -507,3 +507,12 @@ pub mod fields {
507507
},
508508
}
509509
}
510+
511+
pub mod cfgs {
512+
#[doc(cfg(all(
513+
any(not(feature = "appservice-api-c"), not(feature = "appservice-api-s")),
514+
any(not(feature = "client"), not(feature = "server")),
515+
)))]
516+
/// Some docs.
517+
pub mod cfgs {}
518+
}

0 commit comments

Comments
 (0)