Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide_completion/src/tests/flyimport.rs')
-rw-r--r--crates/ide_completion/src/tests/flyimport.rs26
1 files changed, 15 insertions, 11 deletions
diff --git a/crates/ide_completion/src/tests/flyimport.rs b/crates/ide_completion/src/tests/flyimport.rs
index 1f96e122f9..fbef6d9937 100644
--- a/crates/ide_completion/src/tests/flyimport.rs
+++ b/crates/ide_completion/src/tests/flyimport.rs
@@ -96,25 +96,29 @@ fn main() {
#[test]
fn short_paths_are_ignored() {
- cov_mark::check!(ignore_short_input_for_path);
+ cov_mark::check!(flyimport_exact_on_short_path);
check(
r#"
//- /lib.rs crate:dep
-pub struct FirstStruct;
+pub struct Bar;
+pub struct Rcar;
+pub struct Rc;
pub mod some_module {
- pub struct SecondStruct;
- pub struct ThirdStruct;
+ pub struct Bar;
+ pub struct Rcar;
+ pub struct Rc;
}
//- /main.rs crate:main deps:dep
-use dep::{FirstStruct, some_module::SecondStruct};
-
fn main() {
- t$0
+ rc$0
}
"#,
- expect![[r#""#]],
+ expect![[r#"
+ st Rc (use dep::Rc)
+ st Rc (use dep::some_module::Rc)
+ "#]],
);
}
@@ -772,7 +776,7 @@ mod foo {
}
fn main() {
- TE$0
+ TES$0
}"#,
expect![[r#"
ct TEST_CONST (use foo::TEST_CONST)
@@ -789,7 +793,7 @@ mod foo {
}
fn main() {
- te$0
+ tes$0
}"#,
expect![[r#"
ct TEST_CONST (use foo::TEST_CONST)
@@ -846,7 +850,7 @@ struct Foo {
some_field: i32,
}
fn main() {
- let _ = Foo { some_field: so$0 };
+ let _ = Foo { some_field: som$0 };
}
"#,
expect![[r#"