add test that it does not create extraneous commas

This commit is contained in:
Domantas Jadenkus 2021-05-24 22:01:26 +03:00
parent 8d2e3816bc
commit 3641abc0c3

View File

@ -1093,6 +1093,26 @@ fn foo(t: bool) {
true => 1 + 2,
$0false => todo!(),
}
}"#,
);
}
#[test]
fn does_not_add_extra_comma() {
check_assist(
fill_match_arms,
r#"
fn foo(t: bool) {
match $0t {
true => 1 + 2,
}
}"#,
r#"
fn foo(t: bool) {
match t {
true => 1 + 2,
$0false => todo!(),
}
}"#,
);
}