|
1 |
| -use run_make_support::{diff, rustc, rustdoc, tmp_dir}; |
| 1 | +// Assert that the search index is generated deterministically, regardless of the |
| 2 | +// order that crates are documented in. |
| 3 | + |
| 4 | +use run_make_support::{diff, rustdoc, tmp_dir}; |
2 | 5 |
|
3 |
| -/// Assert that the search index is generated deterministically, regardless of the |
4 |
| -/// order that crates are documented in. |
5 | 6 | fn main() {
|
6 |
| - let dir_first = tmp_dir().join("first"); |
7 |
| - rustdoc().out_dir(&dir_first).input("foo.rs").run(); |
8 |
| - rustdoc().out_dir(&dir_first).input("bar.rs").run(); |
| 7 | + let foo_first = tmp_dir().join("foo_first"); |
| 8 | + rustdoc().input("foo.rs").output(&foo_first).run(); |
| 9 | + rustdoc().input("bar.rs").output(&foo_first).run(); |
9 | 10 |
|
10 |
| - let dir_second = tmp_dir().join("second"); |
11 |
| - rustdoc().out_dir(&dir_second).input("bar.rs").run(); |
12 |
| - rustdoc().out_dir(&dir_second).input("foo.rs").run(); |
| 11 | + let bar_first = tmp_dir().join("bar_first"); |
| 12 | + rustdoc().input("bar.rs").output(&bar_first).run(); |
| 13 | + rustdoc().input("foo.rs").output(&bar_first).run(); |
13 | 14 |
|
14 | 15 | diff()
|
15 |
| - .expected_file(dir_first.join("search-index.js")) |
16 |
| - .actual_file(dir_second.join("search-index.js")) |
| 16 | + .expected_file(foo_first.join("search-index.js")) |
| 17 | + .actual_file(bar_first.join("search-index.js")) |
17 | 18 | .run();
|
18 | 19 | }
|
0 commit comments