rust/tests/rustdoc-js-std/parser-separators.js
Michael Howell e600c0ba0e rustdoc: add support for type filters in arguments and generics
This makes sense, since the search index has the information in it,
and it's more useful for function signature searches since a
function signature search's item type is, by definition, some type
of function (there's more than one, but not very many).
2023-03-20 22:41:57 -07:00

211 lines
5.1 KiB
JavaScript

// ignore-tidy-tab
const QUERY = [
'aaaaaa b',
'a b',
'a,b',
'a\tb',
'a<b c>',
'a<b,c>',
'a<b\tc>',
];
const PARSED = [
{
elems: [
{
name: 'aaaaaa',
fullPath: ['aaaaaa'],
pathWithoutLast: [],
pathLast: 'aaaaaa',
generics: [],
typeFilter: -1,
},
{
name: 'b',
fullPath: ['b'],
pathWithoutLast: [],
pathLast: 'b',
generics: [],
typeFilter: -1,
},
],
foundElems: 2,
original: "aaaaaa b",
returned: [],
userQuery: "aaaaaa b",
error: null,
},
{
elems: [
{
name: 'a',
fullPath: ['a'],
pathWithoutLast: [],
pathLast: 'a',
generics: [],
typeFilter: -1,
},
{
name: 'b',
fullPath: ['b'],
pathWithoutLast: [],
pathLast: 'b',
generics: [],
typeFilter: -1,
},
],
foundElems: 2,
original: "a b",
returned: [],
userQuery: "a b",
error: null,
},
{
elems: [
{
name: 'a',
fullPath: ['a'],
pathWithoutLast: [],
pathLast: 'a',
generics: [],
typeFilter: -1,
},
{
name: 'b',
fullPath: ['b'],
pathWithoutLast: [],
pathLast: 'b',
generics: [],
typeFilter: -1,
},
],
foundElems: 2,
original: "a,b",
returned: [],
userQuery: "a,b",
error: null,
},
{
elems: [
{
name: 'a',
fullPath: ['a'],
pathWithoutLast: [],
pathLast: 'a',
generics: [],
typeFilter: -1,
},
{
name: 'b',
fullPath: ['b'],
pathWithoutLast: [],
pathLast: 'b',
generics: [],
typeFilter: -1,
},
],
foundElems: 2,
original: "a\tb",
returned: [],
userQuery: "a\tb",
error: null,
},
{
elems: [
{
name: 'a',
fullPath: ['a'],
pathWithoutLast: [],
pathLast: 'a',
generics: [
{
name: 'b',
fullPath: ['b'],
pathWithoutLast: [],
pathLast: 'b',
generics: [],
},
{
name: 'c',
fullPath: ['c'],
pathWithoutLast: [],
pathLast: 'c',
generics: [],
},
],
typeFilter: -1,
},
],
foundElems: 1,
original: "a<b c>",
returned: [],
userQuery: "a<b c>",
error: null,
},
{
elems: [
{
name: 'a',
fullPath: ['a'],
pathWithoutLast: [],
pathLast: 'a',
generics: [
{
name: 'b',
fullPath: ['b'],
pathWithoutLast: [],
pathLast: 'b',
generics: [],
},
{
name: 'c',
fullPath: ['c'],
pathWithoutLast: [],
pathLast: 'c',
generics: [],
},
],
typeFilter: -1,
},
],
foundElems: 1,
original: "a<b,c>",
returned: [],
userQuery: "a<b,c>",
error: null,
},
{
elems: [
{
name: 'a',
fullPath: ['a'],
pathWithoutLast: [],
pathLast: 'a',
generics: [
{
name: 'b',
fullPath: ['b'],
pathWithoutLast: [],
pathLast: 'b',
generics: [],
},
{
name: 'c',
fullPath: ['c'],
pathWithoutLast: [],
pathLast: 'c',
generics: [],
},
],
typeFilter: -1,
},
],
foundElems: 1,
original: "a<b\tc>",
returned: [],
userQuery: "a<b\tc>",
error: null,
},
];