2024-05-05 14:26:35 +00:00
|
|
|
// Assert that the search index is generated deterministically, regardless of the
|
|
|
|
// order that crates are documented in.
|
|
|
|
|
2024-08-28 15:01:40 +00:00
|
|
|
use run_make_support::{diff, path, rustdoc};
|
2024-07-28 22:13:50 +00:00
|
|
|
|
2024-05-04 07:52:42 +00:00
|
|
|
fn main() {
|
2024-08-28 15:01:40 +00:00
|
|
|
let foo_first = path("foo_first");
|
2024-08-15 12:44:48 +00:00
|
|
|
rustdoc().input("foo.rs").out_dir(&foo_first).run();
|
|
|
|
rustdoc().input("bar.rs").out_dir(&foo_first).run();
|
2024-05-04 07:52:42 +00:00
|
|
|
|
2024-08-28 15:01:40 +00:00
|
|
|
let bar_first = path("bar_first");
|
2024-08-15 12:44:48 +00:00
|
|
|
rustdoc().input("bar.rs").out_dir(&bar_first).run();
|
|
|
|
rustdoc().input("foo.rs").out_dir(&bar_first).run();
|
2024-05-04 07:52:42 +00:00
|
|
|
|
|
|
|
diff()
|
2024-05-05 14:26:35 +00:00
|
|
|
.expected_file(foo_first.join("search-index.js"))
|
|
|
|
.actual_file(bar_first.join("search-index.js"))
|
2024-05-04 07:52:42 +00:00
|
|
|
.run();
|
|
|
|
}
|