Add regression test for type declaration layout overflow
This commit is contained in:
parent
59103d1a25
commit
25e74037e8
@ -47,3 +47,10 @@ pub mod sub_mod {
|
||||
/// ```
|
||||
pub struct Foo;
|
||||
}
|
||||
|
||||
pub mod long_trait {
|
||||
use std::ops::DerefMut;
|
||||
|
||||
pub trait ALongNameBecauseItHelpsTestingTheCurrentProblem: DerefMut<Target = u32>
|
||||
+ From<u128> + Send + Sync + AsRef<str> + 'static {}
|
||||
}
|
||||
|
8
src/test/rustdoc-gui/type-declation-overflow.goml
Normal file
8
src/test/rustdoc-gui/type-declation-overflow.goml
Normal file
@ -0,0 +1,8 @@
|
||||
// This test ensures that the type declaration content overflow is handled inside the <pre> directly.
|
||||
goto: file://|DOC_PATH|/lib2/long_trait/trait.ALongNameBecauseItHelpsTestingTheCurrentProblem.html
|
||||
// We set a fixed size so there is no chance of "random" resize.
|
||||
size: (1100, 800)
|
||||
// Logically, the <body> scroll width should be the width of the window.
|
||||
assert-property: ("body", {"scrollWidth": "1100"})
|
||||
// However, since there is overflow in the type declaration, its scroll width is bigger.
|
||||
assert-property: (".type-decl pre", {"scrollWidth": "1324"})
|
Loading…
x
Reference in New Issue
Block a user