about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/alias-lev.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-js-std/alias-lev.js')
-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' },
+    ],
+};