forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test to detect overlapping entries in overview tables
Detects rust-lang#88545
- Loading branch information
1 parent
2801a77
commit a0cc9bb
Showing
4 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
goto: file://|DOC_PATH|/test_docs/huge_amount_of_consts/index.html | ||
|
||
// Make sure that the last two entries are more than 12 pixels apart and not stacked on each other. | ||
|
||
compare-elements-position-near-false: ("//*[@class='item-table']//div[last()-1]", "//*[@class='item-table']//div[last()-3]", {"y": 12}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,7 @@ name = "test_docs" | |
version = "0.1.0" | ||
edition = "2018" | ||
|
||
build = "build.rs" | ||
|
||
[lib] | ||
path = "lib.rs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//! generate 2000 constants for testing | ||
use std::{fs::write, path::PathBuf}; | ||
|
||
fn main() -> std::io::Result<()> { | ||
let out_dir = std::env::var("OUT_DIR").expect("OUT_DIR is not defined"); | ||
|
||
let mut output = String::new(); | ||
for i in 0..2000 { | ||
let line = format!("/// Some const A{0}\npub const A{0}: isize = 0;\n", i); | ||
output.push_str(&*line); | ||
}; | ||
|
||
write(&[&*out_dir, "huge_amount_of_consts.rs"].iter().collect::<PathBuf>(), output) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters