about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-08 14:35:45 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-18 20:59:09 +0200
commitab9cf32131960ee97a9f2f0fdf6dadbd02d3db92 (patch)
treeaddcc7afbeeb92a97836f696e3535c0f47fc3139
parent51b40050039577c3c9544ba1d8b5853adb7bd68b (diff)
downloadrust-ab9cf32131960ee97a9f2f0fdf6dadbd02d3db92.tar.gz
rust-ab9cf32131960ee97a9f2f0fdf6dadbd02d3db92.zip
Add tests for paths
-rw-r--r--src/test/rustdoc-js-std/parser-errors.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/rustdoc-js-std/parser-errors.js b/src/test/rustdoc-js-std/parser-errors.js
index 7b7ca4dbc35..383c8996c1e 100644
--- a/src/test/rustdoc-js-std/parser-errors.js
+++ b/src/test/rustdoc-js-std/parser-errors.js
@@ -28,6 +28,8 @@ const QUERY = [
     "fn:aaaaa<>b",
     "->a<>b",
     "a<->",
+    "a:: a",
+    "a ::a",
 ];
 
 const PARSED = [
@@ -292,4 +294,22 @@ const PARSED = [
         userQuery: 'a<->',
         error: 'Unexpected `-` after `<`',
     },
+    {
+        elems: [],
+        foundElems: 0,
+        original: 'a:: a',
+        returned: [],
+        typeFilter: -1,
+        userQuery: 'a:: a',
+        error: 'Paths cannot end with `::`',
+    },
+    {
+        elems: [],
+        foundElems: 0,
+        original: 'a ::a',
+        returned: [],
+        typeFilter: -1,
+        userQuery: 'a ::a',
+        error: 'Paths cannot start with `::`',
+    },
 ];