diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2022-01-03 23:51:20 +0100 | 
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2022-04-18 20:59:08 +0200 | 
| commit | 51de26cfd977edc7b0dc5450474a840359a79443 (patch) | |
| tree | 8fa0ad96312db3273a03baa22a50994ea9d45512 /src/test/rustdoc-js-std/parser-errors.js | |
| parent | bbcf1762ddd06a895b0bb235fa0718901dc73184 (diff) | |
| download | rust-51de26cfd977edc7b0dc5450474a840359a79443.tar.gz rust-51de26cfd977edc7b0dc5450474a840359a79443.zip | |
* If type filter is in quotes, throw an error.
* If there are generics, don't allow to have quotes.
Diffstat (limited to 'src/test/rustdoc-js-std/parser-errors.js')
| -rw-r--r-- | src/test/rustdoc-js-std/parser-errors.js | 28 | 
1 files changed, 27 insertions, 1 deletions
| diff --git a/src/test/rustdoc-js-std/parser-errors.js b/src/test/rustdoc-js-std/parser-errors.js index b789fd05d7c..c5d106120ad 100644 --- a/src/test/rustdoc-js-std/parser-errors.js +++ b/src/test/rustdoc-js-std/parser-errors.js @@ -1,4 +1,4 @@ -const QUERY = ['<"P">', '"P" "P"', 'P "P"']; +const QUERY = ['<"P">', '"P" "P"', 'P "P"', '"p" p', '"const": p']; const PARSED = [ { @@ -40,4 +40,30 @@ const PARSED = [ userQuery: "p \"p\"", error: "Cannot use literal search when there is more than one element", }, + { + args: [], + elemName: null, + elems: [], + foundElems: 0, + id: "\"p\" p", + nameSplit: null, + original: "\"p\" p", + returned: [], + typeFilter: null, + userQuery: "\"p\" p", + error: "You cannot have more than one element if you use quotes", + }, + { + args: [], + elemName: null, + elems: [], + foundElems: 0, + id: "\"const\": p", + nameSplit: null, + original: "\"const\": p", + returned: [], + typeFilter: null, + userQuery: "\"const\": p", + error: "You cannot use quotes on type filter", + }, ]; | 
