about 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-03-23 17:26:32 +0100
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-18 20:59:09 +0200
commit8e29ed43d9943b2cf705e3511e54ba01d2feaa93 (patch)
tree3aa1edd8d84885ed20d6e8c98652de8c2bde6f26 /src/test/rustdoc-js-std/parser-errors.js
parentf9251eef688590cd4770baaa01241bbb060c2eba (diff)
downloadrust-8e29ed43d9943b2cf705e3511e54ba01d2feaa93.tar.gz
rust-8e29ed43d9943b2cf705e3511e54ba01d2feaa93.zip
Add isIdentCharacter function to ensure that unexpected characters are handled correctly
Diffstat (limited to 'src/test/rustdoc-js-std/parser-errors.js')
-rw-r--r--src/test/rustdoc-js-std/parser-errors.js18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/test/rustdoc-js-std/parser-errors.js b/src/test/rustdoc-js-std/parser-errors.js
index 080f82b41ec..ae5145e8322 100644
--- a/src/test/rustdoc-js-std/parser-errors.js
+++ b/src/test/rustdoc-js-std/parser-errors.js
@@ -17,9 +17,10 @@ const QUERY = [
     ":a",
     "a b:",
     "a (b:",
-    "{:",
+    "_:",
     "a-bb",
     "a>bb",
+    "ab'",
 ];
 
 const PARSED = [
@@ -188,11 +189,11 @@ const PARSED = [
     {
         elems: [],
         foundElems: 0,
-        original: "{:",
+        original: "_:",
         returned: [],
         typeFilter: -1,
-        userQuery: "{:",
-        error: "Unknown type filter `{`",
+        userQuery: "_:",
+        error: "Unknown type filter `_`",
     },
     {
         elems: [],
@@ -212,4 +213,13 @@ const PARSED = [
         userQuery: "a>bb",
         error: "Unexpected `>` (did you mean `->`?)",
     },
+    {
+        elems: [],
+        foundElems: 0,
+        original: "ab'",
+        returned: [],
+        typeFilter: -1,
+        userQuery: "ab'",
+        error: "Unexpected `'`",
+    },
 ];