about summary refs log tree commit diff
path: root/tests/rustdoc-gui/fields.goml
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2023-06-21 17:42:53 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2023-06-21 17:42:53 +0200
commit805edb0a4a028d1d0f4f7f776ac8d2d36f131dd4 (patch)
treecaa886ca9183fe33a3c61242fefa2398133b7bf5 /tests/rustdoc-gui/fields.goml
parent6f485269632c031b6b698a8f7bf820839dca4f2b (diff)
downloadrust-805edb0a4a028d1d0f4f7f776ac8d2d36f131dd4.tar.gz
rust-805edb0a4a028d1d0f4f7f776ac8d2d36f131dd4.zip
Add test to prevent regression for fields display
Diffstat (limited to 'tests/rustdoc-gui/fields.goml')
-rw-r--r--tests/rustdoc-gui/fields.goml18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/rustdoc-gui/fields.goml b/tests/rustdoc-gui/fields.goml
new file mode 100644
index 00000000000..b8139a2edac
--- /dev/null
+++ b/tests/rustdoc-gui/fields.goml
@@ -0,0 +1,18 @@
+// This test checks that fields are displayed as expected (one by line).
+go-to: "file://" + |DOC_PATH| + "/test_docs/fields/struct.Struct.html"
+store-position: ("#structfield\.a", {"y": a_y})
+store-position: ("#structfield\.b", {"y": b_y})
+assert: |a_y| < |b_y|
+
+go-to: "file://" + |DOC_PATH| + "/test_docs/fields/union.Union.html"
+store-position: ("#structfield\.a", {"y": a_y})
+store-position: ("#structfield\.b", {"y": b_y})
+assert: |a_y| < |b_y|
+
+go-to: "file://" + |DOC_PATH| + "/test_docs/fields/enum.Enum.html"
+store-position: ("#variant\.A\.field\.a", {"y": a_y})
+store-position: ("#variant\.A\.field\.b", {"y": b_y})
+assert: |a_y| < |b_y|
+store-position: ("#variant\.B\.field\.a", {"y": a_y})
+store-position: ("#variant\.B\.field\.b", {"y": b_y})
+assert: |a_y| < |b_y|