about summary refs log tree commit diff
path: root/tests/run-make/rustdoc-determinism
diff options
context:
space:
mode:
authorJoshua Nelson <github@jyn.dev>2023-03-30 07:34:55 -0500
committerJoshua Nelson <github@jyn.dev>2023-03-30 07:34:55 -0500
commit433da1fc047bb39a263eefca4bdb2b1972f1d2ce (patch)
tree28540e78fdd5fdf158267e67495121ac64f0866a /tests/run-make/rustdoc-determinism
parentf2d9a3d0771504f1ae776226a5799dcb4408a91a (diff)
Move almost all run-make-fulldeps to run-make
They pass fine.
Diffstat (limited to 'tests/run-make/rustdoc-determinism')
-rw-r--r--tests/run-make/rustdoc-determinism/Makefile16
-rw-r--r--tests/run-make/rustdoc-determinism/bar.rs1
-rw-r--r--tests/run-make/rustdoc-determinism/foo.rs1
3 files changed, 18 insertions, 0 deletions
diff --git a/tests/run-make/rustdoc-determinism/Makefile b/tests/run-make/rustdoc-determinism/Makefile
new file mode 100644
index 00000000000..a3ef1690671
--- /dev/null
+++ b/tests/run-make/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/rustdoc-determinism/bar.rs b/tests/run-make/rustdoc-determinism/bar.rs
new file mode 100644
index 00000000000..ca05a6a9076
--- /dev/null
+++ b/tests/run-make/rustdoc-determinism/bar.rs
@@ -0,0 +1 @@
+pub struct Bar;
diff --git a/tests/run-make/rustdoc-determinism/foo.rs b/tests/run-make/rustdoc-determinism/foo.rs
new file mode 100644
index 00000000000..4a835673a59
--- /dev/null
+++ b/tests/run-make/rustdoc-determinism/foo.rs
@@ -0,0 +1 @@
+pub struct Foo;