about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2021-10-18 16:50:31 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2021-10-18 16:50:31 +0200
commit77c29294be4b7d25893eeb283c90d139f898c054 (patch)
tree178dfcf42ae5c8288923fa3dad481df8b143bbbf
parent20c286e268d0f77498ecbc542e23f81179fb94a4 (diff)
downloadrust-77c29294be4b7d25893eeb283c90d139f898c054.tar.gz
rust-77c29294be4b7d25893eeb283c90d139f898c054.zip
Add test to ensure that the docblock elements left margin is as expected
-rw-r--r--src/test/rustdoc-gui/check-code-blocks-margin.goml6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/rustdoc-gui/check-code-blocks-margin.goml b/src/test/rustdoc-gui/check-code-blocks-margin.goml
new file mode 100644
index 00000000000..2de47682856
--- /dev/null
+++ b/src/test/rustdoc-gui/check-code-blocks-margin.goml
@@ -0,0 +1,6 @@
+// This test ensures that the docblock elements have the appropriate left margin.
+goto: file://|DOC_PATH|/test_docs/fn.foo.html
+// The top docblock elements shouldn't have left margin...
+assert-css: ("#main .docblock.item-decl", {"margin-left": "0px"})
+// ... but all the others should!
+assert-css: ("#main .docblock:not(.item-decl)", {"margin-left": "24px"})