aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r--crates/ra_assists/src/handlers/merge_imports.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/crates/ra_assists/src/handlers/merge_imports.rs b/crates/ra_assists/src/handlers/merge_imports.rs
index 9c57d1e30..5d4b74e56 100644
--- a/crates/ra_assists/src/handlers/merge_imports.rs
+++ b/crates/ra_assists/src/handlers/merge_imports.rs
@@ -171,6 +171,34 @@ use std::{fmt::<|>{Display, Debug}};
171 } 171 }
172 172
173 #[test] 173 #[test]
174 fn test_merge_single_wildcard_diff_prefixes() {
175 check_assist(
176 merge_imports,
177 r"
178use std<|>::cell::*;
179use std::str;
180",
181 r"
182use std<|>::{cell::*, str};
183",
184 )
185 }
186
187 #[test]
188 fn test_merge_both_wildcard_diff_prefixes() {
189 check_assist(
190 merge_imports,
191 r"
192use std<|>::cell::*;
193use std::str::*;
194",
195 r"
196use std<|>::{cell::*, str::*};
197",
198 )
199 }
200
201 #[test]
174 fn removes_just_enough_whitespace() { 202 fn removes_just_enough_whitespace() {
175 check_assist( 203 check_assist(
176 merge_imports, 204 merge_imports,