aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/completion/complete_keyword.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/completion/complete_keyword.rs')
-rw-r--r--crates/ra_ide/src/completion/complete_keyword.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/crates/ra_ide/src/completion/complete_keyword.rs b/crates/ra_ide/src/completion/complete_keyword.rs
index c3c6eda33..34d061f5a 100644
--- a/crates/ra_ide/src/completion/complete_keyword.rs
+++ b/crates/ra_ide/src/completion/complete_keyword.rs
@@ -176,7 +176,10 @@ fn complete_return(
176mod tests { 176mod tests {
177 use expect::{expect, Expect}; 177 use expect::{expect, Expect};
178 178
179 use crate::completion::{test_utils::completion_list, CompletionKind}; 179 use crate::completion::{
180 test_utils::{check_edit, completion_list},
181 CompletionKind,
182 };
180 183
181 fn check(ra_fixture: &str, expect: Expect) { 184 fn check(ra_fixture: &str, expect: Expect) {
182 let actual = completion_list(ra_fixture, CompletionKind::Keyword); 185 let actual = completion_list(ra_fixture, CompletionKind::Keyword);
@@ -312,6 +315,11 @@ mod tests {
312 kw while 315 kw while
313 "#]], 316 "#]],
314 ); 317 );
318 check_edit(
319 "else",
320 r#"fn quux() { if true { () } <|> }"#,
321 r#"fn quux() { if true { () } else {$0} }"#,
322 );
315 } 323 }
316 324
317 #[test] 325 #[test]