mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 10:18:25 +00:00
Add test for aliases partial match
This commit is contained in:
parent
b0bf51f9a9
commit
c079c96877
11
tests/rustdoc-js-std/alias-lev.js
Normal file
11
tests/rustdoc-js-std/alias-lev.js
Normal file
@ -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' },
|
||||
],
|
||||
};
|
@ -115,11 +115,10 @@ const EXPECTED = [
|
||||
query: '加法',
|
||||
others: [
|
||||
{
|
||||
name: "add",
|
||||
name: "加法",
|
||||
path: "non_english_identifier",
|
||||
is_alias: true,
|
||||
alias: "加法",
|
||||
href: "../non_english_identifier/macro.add.html"
|
||||
href: "../non_english_identifier/trait.加法.html",
|
||||
desc: "Add"
|
||||
},
|
||||
{
|
||||
name: "add",
|
||||
@ -129,11 +128,13 @@ const EXPECTED = [
|
||||
href: "../non_english_identifier/fn.add.html"
|
||||
},
|
||||
{
|
||||
name: "加法",
|
||||
name: "add",
|
||||
path: "non_english_identifier",
|
||||
href: "../non_english_identifier/trait.加法.html",
|
||||
desc: "Add"
|
||||
}],
|
||||
is_alias: true,
|
||||
alias: "加法",
|
||||
href: "../non_english_identifier/macro.add.html"
|
||||
},
|
||||
],
|
||||
in_args: [{
|
||||
name: "加上",
|
||||
path: "non_english_identifier::加法",
|
||||
|
Loading…
x
Reference in New Issue
Block a user