2024-05-05 17:07:32 +02:00
|
|
|
// Assert that the search index is generated deterministically, regardless of the
|
|
|
|
// order that crates are documented in.
|
|
|
|
|
|
|
|
use run_make_support::rustdoc;
|
|
|
|
|
|
|
|
fn main() {
|
2024-06-07 15:23:10 +02:00
|
|
|
let output = rustdoc().input("input.rs").arg("--test").run_fail().stdout_utf8();
|
2024-05-05 17:07:32 +02:00
|
|
|
|
|
|
|
let should_contain = &[
|
|
|
|
"input.rs - foo (line 5)",
|
2025-03-07 15:20:14 +01:00
|
|
|
"input.rs:8:15",
|
2024-05-29 15:01:33 +10:00
|
|
|
"input.rs - bar (line 13)",
|
2025-03-07 15:20:14 +01:00
|
|
|
"input.rs:16:15",
|
2024-05-29 15:01:33 +10:00
|
|
|
"input.rs - bar (line 22)",
|
2025-03-07 15:20:14 +01:00
|
|
|
"input.rs:25:15",
|
2024-05-05 17:07:32 +02:00
|
|
|
];
|
|
|
|
for text in should_contain {
|
|
|
|
assert!(output.contains(text), "output doesn't contains {:?}", text);
|
|
|
|
}
|
|
|
|
}
|