summaryrefslogtreecommitdiffstats
path: root/tests/run-make-fulldeps/rustdoc-determinism
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/run-make-fulldeps/rustdoc-determinism
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make-fulldeps/rustdoc-determinism')
-rw-r--r--tests/run-make-fulldeps/rustdoc-determinism/Makefile16
-rw-r--r--tests/run-make-fulldeps/rustdoc-determinism/bar.rs1
-rw-r--r--tests/run-make-fulldeps/rustdoc-determinism/foo.rs1
3 files changed, 18 insertions, 0 deletions
diff --git a/tests/run-make-fulldeps/rustdoc-determinism/Makefile b/tests/run-make-fulldeps/rustdoc-determinism/Makefile
new file mode 100644
index 000000000..a3ef16906
--- /dev/null
+++ b/tests/run-make-fulldeps/rustdoc-determinism/Makefile
@@ -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
diff --git a/tests/run-make-fulldeps/rustdoc-determinism/bar.rs b/tests/run-make-fulldeps/rustdoc-determinism/bar.rs
new file mode 100644
index 000000000..ca05a6a90
--- /dev/null
+++ b/tests/run-make-fulldeps/rustdoc-determinism/bar.rs
@@ -0,0 +1 @@
+pub struct Bar;
diff --git a/tests/run-make-fulldeps/rustdoc-determinism/foo.rs b/tests/run-make-fulldeps/rustdoc-determinism/foo.rs
new file mode 100644
index 000000000..4a835673a
--- /dev/null
+++ b/tests/run-make-fulldeps/rustdoc-determinism/foo.rs
@@ -0,0 +1 @@
+pub struct Foo;