From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/rustdoc-js-std/parser-generics.js | 62 +++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 tests/rustdoc-js-std/parser-generics.js (limited to 'tests/rustdoc-js-std/parser-generics.js') diff --git a/tests/rustdoc-js-std/parser-generics.js b/tests/rustdoc-js-std/parser-generics.js new file mode 100644 index 000000000..0cf7f5019 --- /dev/null +++ b/tests/rustdoc-js-std/parser-generics.js @@ -0,0 +1,62 @@ +const QUERY = ['A, E>', 'p<> u8', '"p"']; + +const PARSED = [ + { + elems: [], + foundElems: 0, + original: 'A, E>', + returned: [], + typeFilter: -1, + userQuery: 'a, e>', + error: 'Unexpected `<` after `<`', + }, + { + elems: [ + { + name: "p", + fullPath: ["p"], + pathWithoutLast: [], + pathLast: "p", + generics: [], + }, + { + name: "u8", + fullPath: ["u8"], + pathWithoutLast: [], + pathLast: "u8", + generics: [], + }, + ], + foundElems: 2, + original: "p<> u8", + returned: [], + typeFilter: -1, + userQuery: "p<> u8", + error: null, + }, + { + elems: [ + { + name: "p", + fullPath: ["p"], + pathWithoutLast: [], + pathLast: "p", + generics: [ + { + name: "a", + fullPath: ["a"], + pathWithoutLast: [], + pathLast: "a", + generics: [], + }, + ], + }, + ], + foundElems: 1, + original: '"p"', + returned: [], + typeFilter: -1, + userQuery: '"p"', + error: null, + }, +]; -- cgit v1.2.3