about summary refs log tree commit diff
path: root/tests/rustdoc-js-std
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-js-std')
-rw-r--r--tests/rustdoc-js-std/parser-errors.js27
-rw-r--r--tests/rustdoc-js-std/parser-paths.js48
2 files changed, 57 insertions, 18 deletions
diff --git a/tests/rustdoc-js-std/parser-errors.js b/tests/rustdoc-js-std/parser-errors.js
index ab8d72bf71b..410fe11b9cf 100644
--- a/tests/rustdoc-js-std/parser-errors.js
+++ b/tests/rustdoc-js-std/parser-errors.js
@@ -144,6 +144,15 @@ const PARSED = [
         error: "Unexpected `::::`",
     },
     {
+        query: "a:: ::b",
+        elems: [],
+        foundElems: 0,
+        original: "a:: ::b",
+        returned: [],
+        userQuery: "a:: ::b",
+        error: "Unexpected `:: ::`",
+    },
+    {
         query: "a::b::",
         elems: [],
         foundElems: 0,
@@ -315,24 +324,6 @@ const PARSED = [
         error: 'Unexpected `-` after `<`',
     },
     {
-        query: "a:: a",
-        elems: [],
-        foundElems: 0,
-        original: 'a:: a',
-        returned: [],
-        userQuery: 'a:: a',
-        error: 'Unexpected `:: `',
-    },
-    {
-        query: "a ::a",
-        elems: [],
-        foundElems: 0,
-        original: 'a ::a',
-        returned: [],
-        userQuery: 'a ::a',
-        error: 'Unexpected ` ::`',
-    },
-    {
         query: "a<a>:",
         elems: [],
         foundElems: 0,
diff --git a/tests/rustdoc-js-std/parser-paths.js b/tests/rustdoc-js-std/parser-paths.js
index 8d4dedf3f46..774e5d028cc 100644
--- a/tests/rustdoc-js-std/parser-paths.js
+++ b/tests/rustdoc-js-std/parser-paths.js
@@ -16,6 +16,54 @@ const PARSED = [
         error: null,
     },
     {
+        query: "a:: a",
+        elems: [{
+            name: "a:: a",
+            fullPath: ["a", "a"],
+            pathWithoutLast: ["a"],
+            pathLast: "a",
+            generics: [],
+            typeFilter: -1,
+        }],
+        foundElems: 1,
+        original: 'a:: a',
+        returned: [],
+        userQuery: 'a:: a',
+        error: null,
+    },
+    {
+        query: "a ::a",
+        elems: [{
+            name: "a ::a",
+            fullPath: ["a", "a"],
+            pathWithoutLast: ["a"],
+            pathLast: "a",
+            generics: [],
+            typeFilter: -1,
+        }],
+        foundElems: 1,
+        original: 'a ::a',
+        returned: [],
+        userQuery: 'a ::a',
+        error: null,
+    },
+    {
+        query: "a  ::  a",
+        elems: [{
+            name: "a  ::  a",
+            fullPath: ["a", "a"],
+            pathWithoutLast: ["a"],
+            pathLast: "a",
+            generics: [],
+            typeFilter: -1,
+        }],
+        foundElems: 1,
+        original: 'a  ::  a',
+        returned: [],
+        userQuery: 'a  ::  a',
+        error: null,
+    },
+    {
         query: 'A::B,C',
         elems: [
             {