diff options
Diffstat (limited to 'crates/libeditor/src/completion.rs')
-rw-r--r-- | crates/libeditor/src/completion.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/libeditor/src/completion.rs b/crates/libeditor/src/completion.rs index 2b6a1db86..42cc656ee 100644 --- a/crates/libeditor/src/completion.rs +++ b/crates/libeditor/src/completion.rs | |||
@@ -313,5 +313,14 @@ mod tests { | |||
313 | CompletionItem { name: "continue", snippet: Some("continue") }, | 313 | CompletionItem { name: "continue", snippet: Some("continue") }, |
314 | CompletionItem { name: "break", snippet: Some("break") }, | 314 | CompletionItem { name: "break", snippet: Some("break") }, |
315 | CompletionItem { name: "return", snippet: Some("return $0") }]"#); | 315 | CompletionItem { name: "return", snippet: Some("return $0") }]"#); |
316 | check_snippet_completion(r" | ||
317 | fn quux() -> i32 { | ||
318 | loop { || { <|> } } | ||
319 | } | ||
320 | ", r#"[CompletionItem { name: "if", snippet: Some("if $0 { }") }, | ||
321 | CompletionItem { name: "match", snippet: Some("match $0 { }") }, | ||
322 | CompletionItem { name: "while", snippet: Some("while $0 { }") }, | ||
323 | CompletionItem { name: "loop", snippet: Some("loop {$0}") }, | ||
324 | CompletionItem { name: "return", snippet: Some("return $0") }]"#); | ||
316 | } | 325 | } |
317 | } | 326 | } |