rust/tests/rustdoc-js-std/parser-separators.js
Michael Howell 930cba8061 rustdoc-search: replace TAB/NL/LF with SP first
This way, most of the parsing code doesn't need to be designed to handle
it, since they should always be treated exactly the same anyhow.
2023-11-29 11:02:56 -07:00

196 lines
4.7 KiB
JavaScript

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