From 789efede824c8ae68b34051d8e822bcab4ae4155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Fri, 22 Jan 2021 23:15:38 +0100 Subject: Add failing test case --- crates/assists/src/handlers/fill_match_arms.rs | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'crates/assists') diff --git a/crates/assists/src/handlers/fill_match_arms.rs b/crates/assists/src/handlers/fill_match_arms.rs index 7663d211d..4964ddc7d 100644 --- a/crates/assists/src/handlers/fill_match_arms.rs +++ b/crates/assists/src/handlers/fill_match_arms.rs @@ -271,6 +271,34 @@ mod tests { ); } + #[test] + fn partial_fill_option() { + check_assist( + fill_match_arms, + r#" +enum Option { Some(T), None } +use Option::*; + +fn main() { + match None$0 { + None => {} + } +} + "#, + r#" +enum Option { Some(T), None } +use Option::*; + +fn main() { + match None { + None => {} + Some(${0:_}) => {} + } +} + "#, + ); + } + #[test] fn partial_fill_or_pat() { check_assist( -- cgit v1.2.3