about summary refs log tree commit diff
path: root/src/test/rustdoc-js-std/parser-weird-queries.js
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-03-28 16:14:00 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-18 20:59:09 +0200
commitda829d8d9de73f196b17ab5e8b4a4c07863e30c9 (patch)
tree08de17fef317c80546715484ccafaff90c9bef27 /src/test/rustdoc-js-std/parser-weird-queries.js
parent1f5c4c2b306689347d12627bae9895624ee8eae1 (diff)
downloadrust-da829d8d9de73f196b17ab5e8b4a4c07863e30c9.tar.gz
rust-da829d8d9de73f196b17ab5e8b4a4c07863e30c9.zip
Improve the BNF description a bit and fix some issues
Diffstat (limited to 'src/test/rustdoc-js-std/parser-weird-queries.js')
-rw-r--r--src/test/rustdoc-js-std/parser-weird-queries.js26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/test/rustdoc-js-std/parser-weird-queries.js b/src/test/rustdoc-js-std/parser-weird-queries.js
index 87ebe21c49b..4b4ce64284e 100644
--- a/src/test/rustdoc-js-std/parser-weird-queries.js
+++ b/src/test/rustdoc-js-std/parser-weird-queries.js
@@ -1,7 +1,7 @@
 // This test is mostly to check that the parser still kinda outputs something
 // (and doesn't enter an infinite loop!) even though the query is completely
 // invalid.
-const QUERY = ['a b', 'a   b', 'a,b(c)'];
+const QUERY = ['a b', 'a   b', 'a,b(c)', 'aaa,a'];
 
 const PARSED = [
     {
@@ -61,4 +61,28 @@ const PARSED = [
         userQuery: "a,b(c)",
         error: "Unexpected `(`",
     },
+    {
+        elems: [
+            {
+                name: "aaa",
+                fullPath: ["aaa"],
+                pathWithoutLast: [],
+                pathLast: "aaa",
+                generics: [],
+            },
+            {
+                name: "a",
+                fullPath: ["a"],
+                pathWithoutLast: [],
+                pathLast: "a",
+                generics: [],
+            },
+        ],
+        foundElems: 2,
+        original: "aaa,a",
+        returned: [],
+        typeFilter: -1,
+        userQuery: "aaa,a",
+        error: null,
+    },
 ];