0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-11-21 22:01:17 +01:00
rust/tests/rustdoc-js-std/parser-quote.js
2024-10-30 10:35:38 -07:00

73 lines
1.6 KiB
JavaScript

const PARSED = [
{
query: '-> "p"',
elems: [],
foundElems: 1,
userQuery: '-> "p"',
returned: [{
name: "p",
fullPath: ["p"],
pathWithoutLast: [],
pathLast: "p",
generics: [],
typeFilter: -1,
}],
error: null,
},
{
query: '"p",',
elems: [{
name: "p",
fullPath: ["p"],
pathWithoutLast: [],
pathLast: "p",
generics: [],
typeFilter: -1,
}],
foundElems: 1,
userQuery: '"p",',
returned: [],
error: null,
},
{
query: '"p" -> a',
elems: [],
foundElems: 0,
userQuery: '"p" -> a',
returned: [],
error: "Cannot have more than one element if you use quotes",
},
{
query: '"a" -> "p"',
elems: [],
foundElems: 0,
userQuery: '"a" -> "p"',
returned: [],
error: "Cannot have more than one literal search element",
},
{
query: '->"-"',
elems: [],
foundElems: 0,
userQuery: '->"-"',
returned: [],
error: 'Unexpected `-` in a string element',
},
{
query: '"a',
elems: [],
foundElems: 0,
userQuery: '"a',
returned: [],
error: 'Unclosed `"`',
},
{
query: '""',
elems: [],
foundElems: 0,
userQuery: '""',
returned: [],
error: 'Cannot have empty string element',
},
];