diff options
Diffstat (limited to 'crates/ra_assists')
-rw-r--r-- | crates/ra_assists/src/handlers/merge_imports.rs | 28 |
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" | ||
178 | use std<|>::cell::*; | ||
179 | use std::str; | ||
180 | ", | ||
181 | r" | ||
182 | use 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" | ||
192 | use std<|>::cell::*; | ||
193 | use std::str::*; | ||
194 | ", | ||
195 | r" | ||
196 | use 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, |