summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-js-std/parser-separators.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /tests/rustdoc-js-std/parser-separators.js
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/rustdoc-js-std/parser-separators.js97
1 files changed, 41 insertions, 56 deletions
diff --git a/tests/rustdoc-js-std/parser-separators.js b/tests/rustdoc-js-std/parser-separators.js
index fc8c5114c..00c489b51 100644
--- a/tests/rustdoc-js-std/parser-separators.js
+++ b/tests/rustdoc-js-std/parser-separators.js
@@ -1,17 +1,26 @@
// ignore-tidy-tab
-const QUERY = [
- 'aaaaaa b',
- 'a b',
- 'a,b',
- 'a\tb',
- 'a<b c>',
- 'a<b,c>',
- 'a<b\tc>',
-];
-
const PARSED = [
{
+ query: 'aaaaaa b',
+ elems: [
+ {
+ name: 'aaaaaa\tb',
+ 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',
@@ -31,37 +40,31 @@ const PARSED = [
},
],
foundElems: 2,
- original: "aaaaaa b",
+ original: "aaaaaa, b",
returned: [],
- userQuery: "aaaaaa b",
+ userQuery: "aaaaaa, b",
error: null,
},
{
+ query: 'a b',
elems: [
{
- name: 'a',
- fullPath: ['a'],
- pathWithoutLast: [],
- pathLast: 'a',
- generics: [],
- typeFilter: -1,
- },
- {
- name: 'b',
- fullPath: ['b'],
- pathWithoutLast: [],
+ name: 'a b',
+ fullPath: ['a', 'b'],
+ pathWithoutLast: ['a'],
pathLast: 'b',
generics: [],
typeFilter: -1,
},
],
- foundElems: 2,
+ foundElems: 1,
original: "a b",
returned: [],
userQuery: "a b",
error: null,
},
{
+ query: 'a,b',
elems: [
{
name: 'a',
@@ -87,31 +90,25 @@ const PARSED = [
error: null,
},
{
+ query: 'a\tb',
elems: [
{
- name: 'a',
- fullPath: ['a'],
- pathWithoutLast: [],
- pathLast: 'a',
- generics: [],
- typeFilter: -1,
- },
- {
- name: 'b',
- fullPath: ['b'],
- pathWithoutLast: [],
+ name: 'a\tb',
+ fullPath: ['a', 'b'],
+ pathWithoutLast: ['a'],
pathLast: 'b',
generics: [],
typeFilter: -1,
},
],
- foundElems: 2,
+ foundElems: 1,
original: "a\tb",
returned: [],
userQuery: "a\tb",
error: null,
},
{
+ query: 'a<b c>',
elems: [
{
name: 'a',
@@ -120,16 +117,9 @@ const PARSED = [
pathLast: 'a',
generics: [
{
- name: 'b',
- fullPath: ['b'],
- pathWithoutLast: [],
- pathLast: 'b',
- generics: [],
- },
- {
- name: 'c',
- fullPath: ['c'],
- pathWithoutLast: [],
+ name: 'b c',
+ fullPath: ['b', 'c'],
+ pathWithoutLast: ['b'],
pathLast: 'c',
generics: [],
},
@@ -144,6 +134,7 @@ const PARSED = [
error: null,
},
{
+ query: 'a<b,c>',
elems: [
{
name: 'a',
@@ -176,6 +167,7 @@ const PARSED = [
error: null,
},
{
+ query: 'a<b\tc>',
elems: [
{
name: 'a',
@@ -184,16 +176,9 @@ const PARSED = [
pathLast: 'a',
generics: [
{
- name: 'b',
- fullPath: ['b'],
- pathWithoutLast: [],
- pathLast: 'b',
- generics: [],
- },
- {
- name: 'c',
- fullPath: ['c'],
- pathWithoutLast: [],
+ name: 'b\tc',
+ fullPath: ['b', 'c'],
+ pathWithoutLast: ['b'],
pathLast: 'c',
generics: [],
},