diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-12-20 17:45:52 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2022-04-18 20:59:08 +0200 |
| commit | f5833e759ecd55c03afeb918263cb35fabc91177 (patch) | |
| tree | f339a8d44570204e26687434d7f89eb05946062f /src/test/rustdoc-js-std/parser-errors.js | |
| parent | 7cefee027ae8937058e4109911a4ded2e643399b (diff) | |
| download | rust-f5833e759ecd55c03afeb918263cb35fabc91177.tar.gz rust-f5833e759ecd55c03afeb918263cb35fabc91177.zip | |
Add parser tests
Diffstat (limited to 'src/test/rustdoc-js-std/parser-errors.js')
| -rw-r--r-- | src/test/rustdoc-js-std/parser-errors.js | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/test/rustdoc-js-std/parser-errors.js b/src/test/rustdoc-js-std/parser-errors.js new file mode 100644 index 00000000000..98be691e0e7 --- /dev/null +++ b/src/test/rustdoc-js-std/parser-errors.js @@ -0,0 +1,43 @@ +const QUERY = ['<"P">', '"P" "P"', 'P "P"']; + +const PARSED = [ + { + args: [], + elemName: null, + elems: [], + foundElems: 0, + id: "<\"P\">", + nameSplit: null, + original: "<\"P\">", + returned: [], + typeFilter: null, + val: "<\"p\">", + error: "`\"` cannot be used in generics", + }, + { + args: [], + elemName: null, + elems: [], + foundElems: 0, + id: "\"P\" \"P\"", + nameSplit: null, + original: "\"P\" \"P\"", + returned: [], + typeFilter: null, + val: "\"p\" \"p\"", + error: "Cannot have more than one literal search element", + }, + { + args: [], + elemName: null, + elems: [], + foundElems: 0, + id: "P \"P\"", + nameSplit: null, + original: "P \"P\"", + returned: [], + typeFilter: null, + val: "p \"p\"", + error: "Cannot use literal search when there is more than one element", + }, +]; |
