Skip to content

Commit

Permalink
add regression test for #61216
Browse files Browse the repository at this point in the history
Fixes #61216.
  • Loading branch information
euclio committed Jul 3, 2020
1 parent f844ea1 commit 95bf7b7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/test/run-make-fulldeps/rustdoc-determinism/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-include ../tools.mk

# Assert that the search index is generated deterministically, regardless of the
# order that crates are documented in.

# ignore-windows
# Uses `diff`.

all:
$(RUSTDOC) foo.rs -o $(TMPDIR)/foo_first
$(RUSTDOC) bar.rs -o $(TMPDIR)/foo_first

$(RUSTDOC) bar.rs -o $(TMPDIR)/bar_first
$(RUSTDOC) foo.rs -o $(TMPDIR)/bar_first

diff $(TMPDIR)/foo_first/search-index.js $(TMPDIR)/bar_first/search-index.js
1 change: 1 addition & 0 deletions src/test/run-make-fulldeps/rustdoc-determinism/bar.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub struct Bar;
1 change: 1 addition & 0 deletions src/test/run-make-fulldeps/rustdoc-determinism/foo.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub struct Foo;

0 comments on commit 95bf7b7

Please sign in to comment.