about summary refs log tree commit diff
path: root/tests/rustdoc-js-std
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-07-15 21:08:18 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2025-07-16 14:27:22 +0200
commitc079c96877fdd3977c8d5be830931ecb4f79018d (patch)
tree8ebd3410dd0556b32f8811e020efb6b2313066e9 /tests/rustdoc-js-std
parentb0bf51f9a9323ca5abf595c6d0653d60fe68ee24 (diff)
downloadrust-c079c96877fdd3977c8d5be830931ecb4f79018d.tar.gz
rust-c079c96877fdd3977c8d5be830931ecb4f79018d.zip
Add test for aliases partial match
Diffstat (limited to 'tests/rustdoc-js-std')
-rw-r--r--tests/rustdoc-js-std/alias-lev.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/rustdoc-js-std/alias-lev.js b/tests/rustdoc-js-std/alias-lev.js
new file mode 100644
index 00000000000..17f3dc25d76
--- /dev/null
+++ b/tests/rustdoc-js-std/alias-lev.js
@@ -0,0 +1,11 @@
+// This test ensures that aliases are also allowed to be partially matched.
+
+// ignore-order
+
+const EXPECTED = {
+    // The full alias name is `getcwd`.
+    'query': 'getcw',
+    'others': [
+        { 'path': 'std::env', 'name': 'current_dir', 'alias': 'getcwd' },
+    ],
+};