about summary refs log tree commit diff
path: root/src/test/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/rustdoc-js-std/parser-errors.js')
-rw-r--r--src/test/rustdoc-js-std/parser-errors.js40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/test/rustdoc-js-std/parser-errors.js b/src/test/rustdoc-js-std/parser-errors.js
index d4cd9facf17..080f82b41ec 100644
--- a/src/test/rustdoc-js-std/parser-errors.js
+++ b/src/test/rustdoc-js-std/parser-errors.js
@@ -1,4 +1,6 @@
 const QUERY = [
+    '<P>',
+    '-> <P>',
     '<"P">',
     '"P" "P"',
     'P "P"',
@@ -16,12 +18,32 @@ const QUERY = [
     "a b:",
     "a (b:",
     "{:",
+    "a-bb",
+    "a>bb",
 ];
 
 const PARSED = [
     {
         elems: [],
         foundElems: 0,
+        original: "<P>",
+        returned: [],
+        typeFilter: -1,
+        userQuery: "<p>",
+        error: "Found generics without a path",
+    },
+    {
+        elems: [],
+        foundElems: 0,
+        original: "-> <P>",
+        returned: [],
+        typeFilter: -1,
+        userQuery: "-> <p>",
+        error: "Found generics without a path",
+    },
+    {
+        elems: [],
+        foundElems: 0,
         original: "<\"P\">",
         returned: [],
         typeFilter: -1,
@@ -172,4 +194,22 @@ const PARSED = [
         userQuery: "{:",
         error: "Unknown type filter `{`",
     },
+    {
+        elems: [],
+        foundElems: 0,
+        original: "a-bb",
+        returned: [],
+        typeFilter: -1,
+        userQuery: "a-bb",
+        error: "Unexpected `-` (did you mean `->`?)",
+    },
+    {
+        elems: [],
+        foundElems: 0,
+        original: "a>bb",
+        returned: [],
+        typeFilter: -1,
+        userQuery: "a>bb",
+        error: "Unexpected `>` (did you mean `->`?)",
+    },
 ];