aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-05-05 18:01:46 +0100
committerGitHub <[email protected]>2020-05-05 18:01:46 +0100
commitdf7b59081fabd96c6ee5599aad58c941cfb6beb7 (patch)
tree3e2c0ef6c458519d7c324b74e5ab0ff91dec5a3b /crates
parentf0411ff9e0826fab1aaefc3e5b5072d84ce31d35 (diff)
parent7ec1b63f813e45f26668c2d6d803ec72c3c75738 (diff)
Merge #4323
4323: Add tests for #4306 r=kjeremy a=lnicola CC @kjeremy Co-authored-by: Laurențiu Nicola <[email protected]>
Diffstat (limited to 'crates')
-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}