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