aboutsummaryrefslogtreecommitdiff
path: root/crates/libeditor/tests/test.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libeditor/tests/test.rs')
-rw-r--r--crates/libeditor/tests/test.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/libeditor/tests/test.rs b/crates/libeditor/tests/test.rs
index 7979bfffe..d051980b0 100644
--- a/crates/libeditor/tests/test.rs
+++ b/crates/libeditor/tests/test.rs
@@ -273,6 +273,19 @@ fn quux(x: i32) {
273} 273}
274", r#"[CompletionItem { name: "y" }, 274", r#"[CompletionItem { name: "y" },
275 CompletionItem { name: "x" }]"#); 275 CompletionItem { name: "x" }]"#);
276
277 do_check(r"
278fn quux() {
279 if let Some(x) = foo() {
280 let y = 92;
281 };
282 if let Some(a) = bar() {
283 let b = 62;
284 1 + <|>
285 }
286}
287", r#"[CompletionItem { name: "b" },
288 CompletionItem { name: "a" }]"#);
276} 289}
277 290
278fn file(text: &str) -> File { 291fn file(text: &str) -> File {