summary refs log tree commit diff
path: root/src/test/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-17 12:05:31 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-18 21:43:19 +0200
commit299e8ee25ec170cbcc5a6829b2638361875c6f1f (patch)
tree4c969d4465a73e0861a50066b6433603e9ee9ee9 /src/test/rustdoc-js-std/parser-errors.js
parentd7d538a8c493b52ffc76ac1aa325ad4e516bb3e9 (diff)
downloadrust-299e8ee25ec170cbcc5a6829b2638361875c6f1f.tar.gz
rust-299e8ee25ec170cbcc5a6829b2638361875c6f1f.zip
Add an extra check over filter type
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 383c8996c1e..9d92f5ddfd3 100644
--- a/src/test/rustdoc-js-std/parser-errors.js
+++ b/src/test/rustdoc-js-std/parser-errors.js
@@ -30,6 +30,10 @@ const QUERY = [
     "a<->",
     "a:: a",
     "a ::a",
+    "a<a>:",
+    "a<>:",
+    "a,:",
+    "  a<>  :",
 ];
 
 const PARSED = [
@@ -312,4 +316,40 @@ const PARSED = [
         userQuery: 'a ::a',
         error: 'Paths cannot start with `::`',
     },
+    {
+        elems: [],
+        foundElems: 0,
+        original: "a<a>:",
+        returned: [],
+        typeFilter: -1,
+        userQuery: "a<a>:",
+        error: 'Unexpected `:`',
+    },
+    {
+        elems: [],
+        foundElems: 0,
+        original: "a<>:",
+        returned: [],
+        typeFilter: -1,
+        userQuery: "a<>:",
+        error: 'Unexpected `<` in type filter',
+    },
+    {
+        elems: [],
+        foundElems: 0,
+        original: "a,:",
+        returned: [],
+        typeFilter: -1,
+        userQuery: "a,:",
+        error: 'Unexpected `,` in type filter',
+    },
+    {
+        elems: [],
+        foundElems: 0,
+        original: "a<>  :",
+        returned: [],
+        typeFilter: -1,
+        userQuery: "a<>  :",
+        error: 'Unexpected `<` in type filter',
+    },
 ];