From 8e29ed43d9943b2cf705e3511e54ba01d2feaa93 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 23 Mar 2022 17:26:32 +0100 Subject: Add isIdentCharacter function to ensure that unexpected characters are handled correctly --- src/test/rustdoc-js-std/parser-errors.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/test/rustdoc-js-std/parser-errors.js') 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 `'`", + }, ]; -- cgit 1.4.1-3-g733a5