about summary refs log tree commit diff
path: root/src/test/rustdoc-js-std
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/rustdoc-js-std')
-rw-r--r--src/test/rustdoc-js-std/parser-quote.js10
-rw-r--r--src/test/rustdoc-js-std/parser-weird-queries.js17
2 files changed, 26 insertions, 1 deletions
diff --git a/src/test/rustdoc-js-std/parser-quote.js b/src/test/rustdoc-js-std/parser-quote.js
index a7aa324c24c..1e16c90de5e 100644
--- a/src/test/rustdoc-js-std/parser-quote.js
+++ b/src/test/rustdoc-js-std/parser-quote.js
@@ -5,6 +5,7 @@ const QUERY = [
     '"a" -> "p"',
     '->"-"',
     '"a',
+    '""',
 ];
 
 const PARSED = [
@@ -74,4 +75,13 @@ const PARSED = [
         userQuery: '"a',
         error: 'Unclosed `"`',
     },
+    {
+        elems: [],
+        foundElems: 0,
+        original: '""',
+        returned: [],
+        typeFilter: -1,
+        userQuery: '""',
+        error: 'Cannot have empty string element',
+    },
 ];
diff --git a/src/test/rustdoc-js-std/parser-weird-queries.js b/src/test/rustdoc-js-std/parser-weird-queries.js
index 4b4ce64284e..d249e0bfdad 100644
--- a/src/test/rustdoc-js-std/parser-weird-queries.js
+++ b/src/test/rustdoc-js-std/parser-weird-queries.js
@@ -1,7 +1,13 @@
 // This test is mostly to check that the parser still kinda outputs something
 // (and doesn't enter an infinite loop!) even though the query is completely
 // invalid.
-const QUERY = ['a b', 'a   b', 'a,b(c)', 'aaa,a'];
+const QUERY = [
+    'a b',
+    'a   b',
+    'a,b(c)',
+    'aaa,a',
+    ',,,,',
+];
 
 const PARSED = [
     {
@@ -85,4 +91,13 @@ const PARSED = [
         userQuery: "aaa,a",
         error: null,
     },
+    {
+        elems: [],
+        foundElems: 0,
+        original: ",,,,",
+        returned: [],
+        typeFilter: -1,
+        userQuery: ",,,,",
+        error: null,
+    },
 ];