add regression test for #61216

Fixes #61216.
This commit is contained in:
Andy Russell 2020-07-03 11:22:33 -04:00
parent f844ea1e56
commit 95bf7b7dac
No known key found for this signature in database
GPG Key ID: BE2221033EDBC374
3 changed files with 18 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1 @@
pub struct Bar;

View File

@ -0,0 +1 @@
pub struct Foo;