about summary refs log tree commit diff
path: root/tests/rustdoc-js/doc-alias-after-other-items.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-js/doc-alias-after-other-items.js')
-rw-r--r--tests/rustdoc-js/doc-alias-after-other-items.js38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/rustdoc-js/doc-alias-after-other-items.js b/tests/rustdoc-js/doc-alias-after-other-items.js
new file mode 100644
index 00000000000..5b22ef67698
--- /dev/null
+++ b/tests/rustdoc-js/doc-alias-after-other-items.js
@@ -0,0 +1,38 @@
+// exact-check
+
+// Checking that doc aliases are always listed after items with equivalent matching.
+
+const EXPECTED = [
+    {
+        'query': 'coo',
+        'others': [
+            {
+                'path': 'doc_alias_after_other_items',
+                'name': 'Foo',
+                'href': '../doc_alias_after_other_items/struct.Foo.html',
+            },
+            {
+                'path': 'doc_alias_after_other_items',
+                'name': 'bar',
+                'alias': 'Boo',
+                'is_alias': true
+            },
+        ],
+    },
+    {
+        'query': '"confiture"',
+        'others': [
+            {
+                'path': 'doc_alias_after_other_items',
+                'name': 'Confiture',
+                'href': '../doc_alias_after_other_items/struct.Confiture.html',
+            },
+            {
+                'path': 'doc_alias_after_other_items',
+                'name': 'this_is_a_long_name',
+                'alias': 'Confiture',
+                'is_alias': true
+            },
+        ],
+    },
+];