From 5c6c1e110f6c249ee21c6b4eebc39d9635d6d565 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 18 Apr 2022 21:05:21 +0200 Subject: [PATCH] Add test to ensure that keywords in path are working --- src/test/rustdoc-js-std/parser-paths.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/test/rustdoc-js-std/parser-paths.js b/src/test/rustdoc-js-std/parser-paths.js index c8c7f21b9bde0..9f823f9336a88 100644 --- a/src/test/rustdoc-js-std/parser-paths.js +++ b/src/test/rustdoc-js-std/parser-paths.js @@ -1,4 +1,4 @@ -const QUERY = ['A::B', 'A::B,C', 'A::B,C']; +const QUERY = ['A::B', 'A::B,C', 'A::B,C', 'mod::a']; const PARSED = [ { @@ -72,4 +72,19 @@ const PARSED = [ userQuery: 'a::b,c', error: null, }, + { + elems: [{ + name: "mod::a", + fullPath: ["mod", "a"], + pathWithoutLast: ["mod"], + pathLast: "a", + generics: [], + }], + foundElems: 1, + original: "mod::a", + returned: [], + typeFilter: -1, + userQuery: "mod::a", + error: null, + }, ];