about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-18 21:05:21 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-18 21:43:19 +0200
commit5c6c1e110f6c249ee21c6b4eebc39d9635d6d565 (patch)
tree879835c10cba2f2fdc644fc7f784dc6fdadec776
parent299e8ee25ec170cbcc5a6829b2638361875c6f1f (diff)
downloadrust-5c6c1e110f6c249ee21c6b4eebc39d9635d6d565.tar.gz
rust-5c6c1e110f6c249ee21c6b4eebc39d9635d6d565.zip
Add test to ensure that keywords in path are working
-rw-r--r--src/test/rustdoc-js-std/parser-paths.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/test/rustdoc-js-std/parser-paths.js b/src/test/rustdoc-js-std/parser-paths.js
index c8c7f21b9bd..9f823f9336a 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<f>,C'];
+const QUERY = ['A::B', 'A::B,C',  'A::B<f>,C', 'mod::a'];
 
 const PARSED = [
     {
@@ -72,4 +72,19 @@ const PARSED = [
         userQuery: 'a::b<f>,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,
+    },
 ];