diff options
author | Aleksey Kladov <[email protected]> | 2018-08-30 19:42:23 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-30 19:42:23 +0100 |
commit | 902df0fc054eb962987a850ba1b32bed59b59623 (patch) | |
tree | 30af7925c29354193990617ed2e8259f7603dfc8 | |
parent | 8f552ab35222b7ea571f7ea9357db41489ae2247 (diff) |
add test
-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 | } |