]> git.lizzy.rs Git - rust.git/commitdiff
add test for rustdoc's --themes flag
authorQuietMisdreavus <grey@quietmisdreavus.net>
Fri, 24 May 2019 19:04:45 +0000 (14:04 -0500)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 18 Nov 2019 15:43:47 +0000 (16:43 +0100)
src/test/run-make-fulldeps/rustdoc-themes/Makefile [new file with mode: 0644]
src/test/run-make-fulldeps/rustdoc-themes/foo.rs [new file with mode: 0644]

diff --git a/src/test/run-make-fulldeps/rustdoc-themes/Makefile b/src/test/run-make-fulldeps/rustdoc-themes/Makefile
new file mode 100644 (file)
index 0000000..a4536e7
--- /dev/null
@@ -0,0 +1,10 @@
+-include ../tools.mk
+
+# Test that rustdoc will properly load in a theme file and display it in the theme selector.
+
+OUTPUT_DIR := "$(TMPDIR)/rustdoc-themes"
+
+all:
+       cp $(S)/src/librustdoc/html/static/themes/light.css $(TMPDIR)/test.css
+       $(RUSTDOC) -o $(OUTPUT_DIR) foo.rs --themes $(TMPDIR)/test.css
+       $(HTMLDOCCK) $(OUTPUT_DIR) foo.rs
diff --git a/src/test/run-make-fulldeps/rustdoc-themes/foo.rs b/src/test/run-make-fulldeps/rustdoc-themes/foo.rs
new file mode 100644 (file)
index 0000000..58efaf7
--- /dev/null
@@ -0,0 +1,4 @@
+// @has test.css
+// @has foo/struct.Foo.html
+// @has - '//link[@rel="stylesheet"]/@href' '../test.css'
+pub struct Foo;