diff options
Diffstat (limited to 'src/test/rustdoc-js-std/parser-paths.js')
| -rw-r--r-- | src/test/rustdoc-js-std/parser-paths.js | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/src/test/rustdoc-js-std/parser-paths.js b/src/test/rustdoc-js-std/parser-paths.js new file mode 100644 index 00000000000..9422eada9bc --- /dev/null +++ b/src/test/rustdoc-js-std/parser-paths.js @@ -0,0 +1,106 @@ +const QUERY = ['A::B', '::A::B', 'A::B::,C', 'A::B::<f>,C']; + +const PARSED = [ + { + args: [], + elemName: null, + elems: [{ + name: "a::b", + fullPath: ["a", "b"], + pathWithoutLast: ["a"], + pathLast: "b", + generics: [], + }], + foundElems: 1, + id: "A::B", + nameSplit: null, + original: "A::B", + returned: [], + typeFilter: -1, + val: "a::b", + error: null, + }, + { + args: [], + elemName: null, + elems: [{ + name: "::a::b", + fullPath: ["a", "b"], + pathWithoutLast: ["a"], + pathLast: "b", + generics: [], + }], + foundElems: 1, + id: '::A::B', + nameSplit: null, + original: '::A::B', + returned: [], + typeFilter: -1, + val: '::a::b', + error: null, + }, + { + args: [], + elemName: null, + elems: [ + { + name: "a::b::", + fullPath: ["a", "b"], + pathWithoutLast: ["a"], + pathLast: "b", + generics: [], + }, + { + name: "c", + fullPath: ["c"], + pathWithoutLast: [], + pathLast: "c", + generics: [], + }, + ], + foundElems: 2, + id: 'A::B::,C', + nameSplit: null, + original: 'A::B::,C', + returned: [], + typeFilter: -1, + val: 'a::b::,c', + error: null, + }, + { + args: [], + elemName: null, + elems: [ + { + name: "a::b::", + fullPath: ["a", "b"], + pathWithoutLast: ["a"], + pathLast: "b", + generics: [ + { + name: "f", + fullPath: ["f"], + pathWithoutLast: [], + pathLast: "f", + generics: [], + }, + ], + }, + { + name: "c", + fullPath: ["c"], + pathWithoutLast: [], + pathLast: "c", + generics: [], + }, + ], + foundElems: 2, + id: 'A::B::<f>,C', + nameSplit: null, + original: 'A::B::<f>,C', + returned: [], + typeFilter: -1, + val: 'a::b::<f>,c', + error: null, + }, +]; |
