Skip to content

Commit df7b590

Browse files
bors[bot]lnicola
andauthored
Merge #4323
4323: Add tests for #4306 r=kjeremy a=lnicola CC @kjeremy Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 parents f0411ff + 7ec1b63 commit df7b590

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

crates/rust-analyzer/src/main_loop.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,5 +1083,17 @@ mod tests {
10831083
assert_eq!(text, "the quick foxes\nDREAM\nthey have quiet dreams\nDON'T THEY?\n");
10841084
run(&mut text, c![0, 10; 1, 5 => "", 2, 0; 2, 12 => ""]);
10851085
assert_eq!(text, "the quick \nthey have quiet dreams\n");
1086+
1087+
text = String::from("❤️");
1088+
run(&mut text, c![0, 0; 0, 0 => "a"]);
1089+
assert_eq!(text, "a❤️");
1090+
1091+
text = String::from("a\nb");
1092+
run(&mut text, c![0, 1; 1, 0 => "\nțc", 0, 1; 1, 1 => "d"]);
1093+
assert_eq!(text, "adcb");
1094+
1095+
text = String::from("a\nb");
1096+
run(&mut text, c![0, 1; 1, 0 => \nc", 0, 2; 0, 2 => "c"]);
1097+
assert_eq!(text, "ațc\ncb");
10861098
}
10871099
}

0 commit comments

Comments
 (0)