Add a basic test for the trait fuzzy import
This commit is contained in:
parent
6f8af890ed
commit
1bfc3a50c0
@ -748,6 +748,30 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fuzzy_import_trait() {
|
||||
let ra_fixture = r#"
|
||||
//- /main.rs crate:main deps:dep
|
||||
//- /dep.rs crate:dep
|
||||
pub mod fmt {
|
||||
pub trait Display {
|
||||
fn fmttt();
|
||||
}
|
||||
}
|
||||
"#;
|
||||
|
||||
check_search(
|
||||
ra_fixture,
|
||||
"main",
|
||||
Query::new("fmt".to_string()).search_mode(SearchMode::Fuzzy),
|
||||
expect![[r#"
|
||||
dep::fmt (t)
|
||||
dep::fmt::Display (t)
|
||||
dep::fmt::Display::fmttt (f)
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn search_mode() {
|
||||
let ra_fixture = r#"
|
||||
|
Loading…
x
Reference in New Issue
Block a user