summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-gui/fields.goml
diff options
context:
space:
mode:
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 000000000..b8139a2ed
--- /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|