aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/completion/complete_qualified_path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/completion/complete_qualified_path.rs')
-rw-r--r--crates/ra_ide/src/completion/complete_qualified_path.rs39
1 files changed, 39 insertions, 0 deletions
diff --git a/crates/ra_ide/src/completion/complete_qualified_path.rs b/crates/ra_ide/src/completion/complete_qualified_path.rs
index f133ce3ce..a16866cd2 100644
--- a/crates/ra_ide/src/completion/complete_qualified_path.rs
+++ b/crates/ra_ide/src/completion/complete_qualified_path.rs
@@ -1206,6 +1206,45 @@ mod tests {
1206 } 1206 }
1207 1207
1208 #[test] 1208 #[test]
1209 fn test_super_super_completion() {
1210 assert_debug_snapshot!(
1211 do_reference_completion(
1212 r"
1213 mod a {
1214 const A: usize = 0;
1215
1216 mod b {
1217 const B: usize = 0;
1218
1219 mod c {
1220 use super::super::<|>
1221 }
1222 }
1223 }
1224 ",
1225 ),
1226 @r###"
1227 [
1228 CompletionItem {
1229 label: "A",
1230 source_range: 120..120,
1231 delete: 120..120,
1232 insert: "A",
1233 kind: Const,
1234 },
1235 CompletionItem {
1236 label: "b",
1237 source_range: 120..120,
1238 delete: 120..120,
1239 insert: "b",
1240 kind: Module,
1241 },
1242 ]
1243 "###
1244 );
1245 }
1246
1247 #[test]
1209 fn completes_reexported_items_under_correct_name() { 1248 fn completes_reexported_items_under_correct_name() {
1210 assert_debug_snapshot!( 1249 assert_debug_snapshot!(
1211 do_reference_completion( 1250 do_reference_completion(