File tree Expand file tree Collapse file tree 1 file changed +20
-5
lines changed
crates/ide_completion/src/completions Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,26 @@ mod tests {
318
318
expect. assert_eq ( & actual) ;
319
319
}
320
320
321
+ #[ test]
322
+ fn test_attribute_completion_inside_nested_attr ( ) {
323
+ check ( r#"#[cfg($0)]"# , expect ! [ [ ] ] )
324
+ }
325
+
326
+ #[ test]
327
+ fn test_attribute_completion_with_existing_attr ( ) {
328
+ check (
329
+ r#"#[no_mangle] #[$0] mcall!();"# ,
330
+ expect ! [ [ r#"
331
+ at allow(…)
332
+ at cfg(…)
333
+ at cfg_attr(…)
334
+ at deny(…)
335
+ at forbid(…)
336
+ at warn(…)
337
+ "# ] ] ,
338
+ )
339
+ }
340
+
321
341
#[ test]
322
342
fn complete_attribute_on_source_file ( ) {
323
343
check (
@@ -731,9 +751,4 @@ mod tests {
731
751
"# ] ] ,
732
752
) ;
733
753
}
734
-
735
- #[ test]
736
- fn test_attribute_completion_inside_nested_attr ( ) {
737
- check ( r#"#[cfg($0)]"# , expect ! [ [ ] ] )
738
- }
739
754
}
You can’t perform that action at this time.
0 commit comments