diff options
author | Aleksey Kladov <[email protected]> | 2020-03-23 19:57:42 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-03-23 19:57:42 +0000 |
commit | 3bd119a4c1a8fbd3000095324e84635767949afb (patch) | |
tree | 03523b1f8d96e5873daa6b8ac7f2bbbc4aa1411a /crates | |
parent | b605271d7f3fa3fd3ac4dd0e1520b80b5fb13b40 (diff) |
Add a test
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_assists/src/handlers/merge_imports.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/ra_assists/src/handlers/merge_imports.rs b/crates/ra_assists/src/handlers/merge_imports.rs index 89bc975bd..c57a8466f 100644 --- a/crates/ra_assists/src/handlers/merge_imports.rs +++ b/crates/ra_assists/src/handlers/merge_imports.rs | |||
@@ -182,4 +182,22 @@ use std::{fmt<|>::{Display, Debug}}; | |||
182 | ", | 182 | ", |
183 | ); | 183 | ); |
184 | } | 184 | } |
185 | |||
186 | #[test] | ||
187 | fn removes_just_enough_whitespace() { | ||
188 | check_assist( | ||
189 | merge_imports, | ||
190 | r" | ||
191 | use foo<|>::bar; | ||
192 | use foo::baz; | ||
193 | |||
194 | /// Doc comment | ||
195 | ", | ||
196 | r" | ||
197 | use foo<|>::{bar, baz}; | ||
198 | |||
199 | /// Doc comment | ||
200 | ", | ||
201 | ); | ||
202 | } | ||
185 | } | 203 | } |