forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite
rustdoc-determinism
test in Rust
- Loading branch information
1 parent
09cd00f
commit 2f4861c
Showing
3 changed files
with
18 additions
and
17 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
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
use run_make_support::{diff, rustc, rustdoc, tmp_dir}; | ||
|
||
/// Assert that the search index is generated deterministically, regardless of the | ||
/// order that crates are documented in. | ||
fn main() { | ||
let dir_first = tmp_dir().join("first"); | ||
rustdoc().out_dir(&dir_first).input("foo.rs").run(); | ||
rustdoc().out_dir(&dir_first).input("bar.rs").run(); | ||
|
||
let dir_second = tmp_dir().join("second"); | ||
rustdoc().out_dir(&dir_second).input("bar.rs").run(); | ||
rustdoc().out_dir(&dir_second).input("foo.rs").run(); | ||
|
||
diff() | ||
.expected_file(dir_first.join("search-index.js")) | ||
.actual_file(dir_second.join("search-index.js")) | ||
.run(); | ||
} |