@@ -137,6 +137,16 @@ fn insert_start_indent() {
137137 use std::bar::B;
138138 use std::bar::C;" ,
139139 ) ;
140+ check_none (
141+ "std::bar::r#AA" ,
142+ r"
143+ use std::bar::B;
144+ use std::bar::C;" ,
145+ r"
146+ use std::bar::r#AA;
147+ use std::bar::B;
148+ use std::bar::C;" ,
149+ ) ;
140150}
141151
142152#[ test]
@@ -173,7 +183,21 @@ fn insert_middle_indent() {
173183 use std::bar::EE;
174184 use std::bar::F;
175185 use std::bar::G;" ,
176- )
186+ ) ;
187+ check_none (
188+ "std::bar::r#EE" ,
189+ r"
190+ use std::bar::A;
191+ use std::bar::D;
192+ use std::bar::F;
193+ use std::bar::G;" ,
194+ r"
195+ use std::bar::A;
196+ use std::bar::D;
197+ use std::bar::r#EE;
198+ use std::bar::F;
199+ use std::bar::G;" ,
200+ ) ;
177201}
178202
179203#[ test]
@@ -210,7 +234,21 @@ fn insert_end_indent() {
210234 use std::bar::F;
211235 use std::bar::G;
212236 use std::bar::ZZ;" ,
213- )
237+ ) ;
238+ check_none (
239+ "std::bar::r#ZZ" ,
240+ r"
241+ use std::bar::A;
242+ use std::bar::D;
243+ use std::bar::F;
244+ use std::bar::G;" ,
245+ r"
246+ use std::bar::A;
247+ use std::bar::D;
248+ use std::bar::F;
249+ use std::bar::G;
250+ use std::bar::r#ZZ;" ,
251+ ) ;
214252}
215253
216254#[ test]
@@ -228,7 +266,21 @@ use std::bar::EE;
228266use std::bar::{D, Z}; // example of weird imports due to user
229267use std::bar::F;
230268use std::bar::G;" ,
231- )
269+ ) ;
270+ check_none (
271+ "std::bar::r#EE" ,
272+ r"
273+ use std::bar::A;
274+ use std::bar::{D, Z}; // example of weird imports due to user
275+ use std::bar::F;
276+ use std::bar::G;" ,
277+ r"
278+ use std::bar::A;
279+ use std::bar::r#EE;
280+ use std::bar::{D, Z}; // example of weird imports due to user
281+ use std::bar::F;
282+ use std::bar::G;" ,
283+ ) ;
232284}
233285
234286#[ test]
@@ -596,7 +648,16 @@ fn merge_groups_full() {
596648
597649#[ test]
598650fn merge_groups_long_full ( ) {
599- check_crate ( "std::foo::bar::Baz" , r"use std::foo::bar::Qux;" , r"use std::foo::bar::{Baz, Qux};" )
651+ check_crate (
652+ "std::foo::bar::Baz" ,
653+ r"use std::foo::bar::Qux;" ,
654+ r"use std::foo::bar::{Baz, Qux};" ,
655+ ) ;
656+ check_crate (
657+ "std::foo::bar::r#Baz" ,
658+ r"use std::foo::bar::Qux;" ,
659+ r"use std::foo::bar::{r#Baz, Qux};" ,
660+ ) ;
600661}
601662
602663#[ test]
@@ -614,7 +675,12 @@ fn merge_groups_long_full_list() {
614675 "std::foo::bar::Baz" ,
615676 r"use std::foo::bar::{Qux, Quux};" ,
616677 r"use std::foo::bar::{Baz, Quux, Qux};" ,
617- )
678+ ) ;
679+ check_crate (
680+ "std::foo::bar::r#Baz" ,
681+ r"use std::foo::bar::{Qux, Quux};" ,
682+ r"use std::foo::bar::{r#Baz, Quux, Qux};" ,
683+ ) ;
618684}
619685
620686#[ test]
@@ -632,7 +698,12 @@ fn merge_groups_long_full_nested() {
632698 "std::foo::bar::Baz" ,
633699 r"use std::foo::bar::{Qux, quux::{Fez, Fizz}};" ,
634700 r"use std::foo::bar::{quux::{Fez, Fizz}, Baz, Qux};" ,
635- )
701+ ) ;
702+ check_crate (
703+ "std::foo::bar::r#Baz" ,
704+ r"use std::foo::bar::{Qux, quux::{Fez, Fizz}};" ,
705+ r"use std::foo::bar::{quux::{Fez, Fizz}, r#Baz, Qux};" ,
706+ ) ;
636707}
637708
638709#[ test]
0 commit comments