Skip to content

Commit

Permalink
Rollup merge of #73998 - euclio:search-index-determinism, r=nikomatsakis
Browse files Browse the repository at this point in the history
add regression test for #61216

Fixes #61216.
  • Loading branch information
Manishearth authored Jul 16, 2020
2 parents 1cc37b6 + 95bf7b7 commit 6dc12fb
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 6dc12fb

Please sign in to comment.