Skip to content

Commit 7d10752

Browse files
committed
Add a test for multi-single-line comments as well
1 parent 1c86657 commit 7d10752

File tree

1 file changed

+15
-0
lines changed
  • crates/ide_db/src/helpers/insert_use

1 file changed

+15
-0
lines changed

crates/ide_db/src/helpers/insert_use/tests.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,21 @@ use foo::bar::Baz;"#,
401401
);
402402
}
403403

404+
#[test]
405+
fn inserts_after_multiple_single_line_comments() {
406+
check_none(
407+
"foo::bar::Baz",
408+
"// Represents a possible license header and/or general module comments
409+
// Second single-line comment
410+
// Third single-line comment",
411+
r#"// Represents a possible license header and/or general module comments
412+
// Second single-line comment
413+
// Third single-line comment
414+
415+
use foo::bar::Baz;"#,
416+
);
417+
}
418+
404419
#[test]
405420
fn inserts_before_single_line_item_comments() {
406421
check_none(

0 commit comments

Comments
 (0)