From 3bd119a4c1a8fbd3000095324e84635767949afb Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 23 Mar 2020 20:57:42 +0100 Subject: Add a test --- crates/ra_assists/src/handlers/merge_imports.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'crates/ra_assists') 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 @@ -179,6 +179,24 @@ use std::{fmt::Debug, fmt<|>::Display}; ", r" use std::{fmt<|>::{Display, Debug}}; +", + ); + } + + #[test] + fn removes_just_enough_whitespace() { + check_assist( + merge_imports, + r" +use foo<|>::bar; +use foo::baz; + +/// Doc comment +", + r" +use foo<|>::{bar, baz}; + +/// Doc comment ", ); } -- cgit v1.2.3