@@ -137,6 +137,16 @@ fn insert_start_indent() {
137
137
use std::bar::B;
138
138
use std::bar::C;" ,
139
139
) ;
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
+ ) ;
140
150
}
141
151
142
152
#[ test]
@@ -173,7 +183,21 @@ fn insert_middle_indent() {
173
183
use std::bar::EE;
174
184
use std::bar::F;
175
185
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
+ ) ;
177
201
}
178
202
179
203
#[ test]
@@ -210,7 +234,21 @@ fn insert_end_indent() {
210
234
use std::bar::F;
211
235
use std::bar::G;
212
236
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
+ ) ;
214
252
}
215
253
216
254
#[ test]
@@ -228,7 +266,21 @@ use std::bar::EE;
228
266
use std::bar::{D, Z}; // example of weird imports due to user
229
267
use std::bar::F;
230
268
use 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
+ ) ;
232
284
}
233
285
234
286
#[ test]
@@ -596,7 +648,16 @@ fn merge_groups_full() {
596
648
597
649
#[ test]
598
650
fn 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
+ ) ;
600
661
}
601
662
602
663
#[ test]
@@ -614,7 +675,12 @@ fn merge_groups_long_full_list() {
614
675
"std::foo::bar::Baz" ,
615
676
r"use std::foo::bar::{Qux, Quux};" ,
616
677
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
+ ) ;
618
684
}
619
685
620
686
#[ test]
@@ -632,7 +698,12 @@ fn merge_groups_long_full_nested() {
632
698
"std::foo::bar::Baz" ,
633
699
r"use std::foo::bar::{Qux, quux::{Fez, Fizz}};" ,
634
700
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
+ ) ;
636
707
}
637
708
638
709
#[ test]
0 commit comments