2021-12-20 10:45:52 -06:00
|
|
|
// This test is mostly to check that the parser still kinda outputs something
|
|
|
|
// (and doesn't enter an infinite loop!) even though the query is completely
|
|
|
|
// invalid.
|
|
|
|
|
|
|
|
const PARSED = [
|
|
|
|
{
|
2023-06-09 09:49:38 -05:00
|
|
|
query: 'a b',
|
2022-01-09 08:12:46 -06:00
|
|
|
elems: [
|
2021-12-20 10:45:52 -06:00
|
|
|
{
|
2023-06-12 09:05:00 -05:00
|
|
|
name: "a b",
|
|
|
|
fullPath: ["a", "b"],
|
|
|
|
pathWithoutLast: ["a"],
|
2022-01-09 08:12:46 -06:00
|
|
|
pathLast: "b",
|
2021-12-20 10:45:52 -06:00
|
|
|
generics: [],
|
|
|
|
},
|
|
|
|
],
|
2023-06-12 09:05:00 -05:00
|
|
|
foundElems: 1,
|
2022-01-09 08:12:46 -06:00
|
|
|
userQuery: "a b",
|
2024-09-24 14:33:09 -05:00
|
|
|
returned: [],
|
2021-12-20 10:45:52 -06:00
|
|
|
error: null,
|
|
|
|
},
|
|
|
|
{
|
2023-06-09 09:49:38 -05:00
|
|
|
query: 'a b',
|
2021-12-20 10:45:52 -06:00
|
|
|
elems: [
|
|
|
|
{
|
2023-06-12 09:05:00 -05:00
|
|
|
name: "a b",
|
|
|
|
fullPath: ["a", "b"],
|
|
|
|
pathWithoutLast: ["a"],
|
2022-01-09 08:12:46 -06:00
|
|
|
pathLast: "b",
|
2021-12-20 10:45:52 -06:00
|
|
|
generics: [],
|
|
|
|
},
|
|
|
|
],
|
2023-06-12 09:05:00 -05:00
|
|
|
foundElems: 1,
|
2022-01-09 08:12:46 -06:00
|
|
|
userQuery: "a b",
|
2024-09-24 14:33:09 -05:00
|
|
|
returned: [],
|
2021-12-20 10:45:52 -06:00
|
|
|
error: null,
|
|
|
|
},
|
2022-03-28 09:14:00 -05:00
|
|
|
{
|
2023-06-09 09:49:38 -05:00
|
|
|
query: 'aaa,a',
|
2022-03-28 09:14:00 -05:00
|
|
|
elems: [
|
|
|
|
{
|
|
|
|
name: "aaa",
|
|
|
|
fullPath: ["aaa"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "aaa",
|
|
|
|
generics: [],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "a",
|
|
|
|
fullPath: ["a"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "a",
|
|
|
|
generics: [],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
foundElems: 2,
|
|
|
|
userQuery: "aaa,a",
|
2024-09-24 14:33:09 -05:00
|
|
|
returned: [],
|
2022-03-28 09:14:00 -05:00
|
|
|
error: null,
|
|
|
|
},
|
2022-04-16 18:43:26 -05:00
|
|
|
{
|
2023-06-09 09:49:38 -05:00
|
|
|
query: ',,,,',
|
2022-04-16 18:43:26 -05:00
|
|
|
elems: [],
|
|
|
|
foundElems: 0,
|
|
|
|
userQuery: ",,,,",
|
2024-09-24 14:33:09 -05:00
|
|
|
returned: [],
|
2022-04-16 18:43:26 -05:00
|
|
|
error: null,
|
|
|
|
},
|
2022-04-17 05:05:31 -05:00
|
|
|
{
|
2023-06-09 09:49:38 -05:00
|
|
|
query: 'mod :',
|
2022-04-17 05:05:31 -05:00
|
|
|
elems: [],
|
|
|
|
foundElems: 0,
|
|
|
|
userQuery: 'mod :',
|
2024-09-24 14:33:09 -05:00
|
|
|
returned: [],
|
2023-06-12 09:05:00 -05:00
|
|
|
error: "Unexpected `:` (expected path after type filter `mod:`)",
|
2022-04-17 05:05:31 -05:00
|
|
|
},
|
|
|
|
{
|
2023-06-09 09:49:38 -05:00
|
|
|
query: 'mod\t:',
|
2022-04-17 05:05:31 -05:00
|
|
|
elems: [],
|
|
|
|
foundElems: 0,
|
2023-11-29 11:54:49 -06:00
|
|
|
userQuery: 'mod :',
|
2024-09-24 14:33:09 -05:00
|
|
|
returned: [],
|
2023-06-12 09:05:00 -05:00
|
|
|
error: "Unexpected `:` (expected path after type filter `mod:`)",
|
2022-04-17 05:05:31 -05:00
|
|
|
},
|
2021-12-20 10:45:52 -06:00
|
|
|
];
|