mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
add test
This commit is contained in:
parent
8f552ab352
commit
902df0fc05
1 changed files with 9 additions and 0 deletions
|
@ -313,5 +313,14 @@ mod tests {
|
|||
CompletionItem { name: "continue", snippet: Some("continue") },
|
||||
CompletionItem { name: "break", snippet: Some("break") },
|
||||
CompletionItem { name: "return", snippet: Some("return $0") }]"#);
|
||||
check_snippet_completion(r"
|
||||
fn quux() -> i32 {
|
||||
loop { || { <|> } }
|
||||
}
|
||||
", r#"[CompletionItem { name: "if", snippet: Some("if $0 { }") },
|
||||
CompletionItem { name: "match", snippet: Some("match $0 { }") },
|
||||
CompletionItem { name: "while", snippet: Some("while $0 { }") },
|
||||
CompletionItem { name: "loop", snippet: Some("loop {$0}") },
|
||||
CompletionItem { name: "return", snippet: Some("return $0") }]"#);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue