about summary refs log tree commit diff
path: root/tests/rustdoc-js-std
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2024-11-14 11:08:06 -0700
committerMichael Howell <michael@notriddle.com>2024-11-14 11:10:14 -0700
commit32500aa8e0f23029c0fa69235d19f770106c016f (patch)
treecff79c70ca071b645ee6fad7e5fa0f4b54715f66 /tests/rustdoc-js-std
parenta4cedecc9ec76b46dcbb954750068c832cf2dd43 (diff)
downloadrust-32500aa8e0f23029c0fa69235d19f770106c016f.tar.gz
rust-32500aa8e0f23029c0fa69235d19f770106c016f.zip
rustdoc-search: case-sensitive only when capitals are used
This is the "smartcase" behavior, described by vim and dtolnay.
Diffstat (limited to 'tests/rustdoc-js-std')
-rw-r--r--tests/rustdoc-js-std/write.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/rustdoc-js-std/write.js b/tests/rustdoc-js-std/write.js
new file mode 100644
index 00000000000..4a9475102a5
--- /dev/null
+++ b/tests/rustdoc-js-std/write.js
@@ -0,0 +1,24 @@
+const EXPECTED = [
+    {
+        'query': 'write',
+        'others': [
+            { 'path': 'std::fmt', 'name': 'write' },
+            { 'path': 'std::fs', 'name': 'write' },
+            { 'path': 'std::ptr', 'name': 'write' },
+            { 'path': 'std::fmt', 'name': 'Write' },
+            { 'path': 'std::io', 'name': 'Write' },
+            { 'path': 'std::hash::Hasher', 'name': 'write' },
+        ],
+    },
+    {
+        'query': 'Write',
+        'others': [
+            { 'path': 'std::fmt', 'name': 'Write' },
+            { 'path': 'std::io', 'name': 'Write' },
+            { 'path': 'std::fmt', 'name': 'write' },
+            { 'path': 'std::fs', 'name': 'write' },
+            { 'path': 'std::ptr', 'name': 'write' },
+            { 'path': 'std::hash::Hasher', 'name': 'write' },
+        ],
+    },
+];