From 77c29294be4b7d25893eeb283c90d139f898c054 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 18 Oct 2021 16:50:31 +0200 Subject: [PATCH] Add test to ensure that the docblock elements left margin is as expected --- src/test/rustdoc-gui/check-code-blocks-margin.goml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/test/rustdoc-gui/check-code-blocks-margin.goml 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 0000000000000..2de4768285679 --- /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"})