rust/src/test/rustdoc-js-std/parser-invalid.js

91 lines
2.1 KiB
JavaScript
Raw Normal View History

2021-12-20 17:45:52 +01: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 QUERY = ['a b', 'a b', 'a,b(c)'];
2021-12-20 17:45:52 +01:00
const PARSED = [
{
args: [],
elems: [
2021-12-20 17:45:52 +01:00
{
name: "a",
fullPath: ["a"],
2021-12-20 17:45:52 +01:00
pathWithoutLast: [],
pathLast: "a",
2021-12-20 17:45:52 +01:00
generics: [],
},
{
name: "b",
fullPath: ["b"],
2021-12-20 17:45:52 +01:00
pathWithoutLast: [],
pathLast: "b",
2021-12-20 17:45:52 +01:00
generics: [],
},
],
foundElems: 2,
original: "a b",
2021-12-20 17:45:52 +01:00
returned: [],
typeFilter: -1,
userQuery: "a b",
2021-12-20 17:45:52 +01:00
error: null,
},
{
args: [],
elems: [
{
name: "a",
fullPath: ["a"],
pathWithoutLast: [],
pathLast: "a",
generics: [],
},
{
name: "b",
fullPath: ["b"],
2021-12-20 17:45:52 +01:00
pathWithoutLast: [],
pathLast: "b",
2021-12-20 17:45:52 +01:00
generics: [],
},
],
foundElems: 2,
original: "a b",
2021-12-20 17:45:52 +01:00
returned: [],
typeFilter: -1,
userQuery: "a b",
2021-12-20 17:45:52 +01:00
error: null,
},
{
args: [
{
name: "c",
fullPath: ["c"],
pathWithoutLast: [],
pathLast: "c",
generics: [],
},
],
elems: [
{
name: "a",
fullPath: ["a"],
pathWithoutLast: [],
pathLast: "a",
generics: [],
},
{
name: "b",
fullPath: ["b"],
pathWithoutLast: [],
pathLast: "b",
generics: [],
},
],
foundElems: 3,
original: "a,b(c)",
returned: [],
typeFilter: -1,
2022-01-03 16:43:30 +01:00
userQuery: "a,b(c)",
2021-12-20 17:45:52 +01:00
error: null,
},
];