aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/rust-analyzer/src/main_loop.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index b163ea848..b77f0c5a9 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -1083,5 +1083,17 @@ mod tests {
1083 assert_eq!(text, "the quick foxes\nDREAM\nthey have quiet dreams\nDON'T THEY?\n"); 1083 assert_eq!(text, "the quick foxes\nDREAM\nthey have quiet dreams\nDON'T THEY?\n");
1084 run(&mut text, c![0, 10; 1, 5 => "", 2, 0; 2, 12 => ""]); 1084 run(&mut text, c![0, 10; 1, 5 => "", 2, 0; 2, 12 => ""]);
1085 assert_eq!(text, "the quick \nthey have quiet dreams\n"); 1085 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");
1086 } 1098 }
1087} 1099}