From 2fa2805887e734647aabebc1f533ec76c48f538a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 21 Feb 2019 14:06:21 +0300 Subject: add failing test --- crates/ra_ide_api_light/src/join_lines.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'crates/ra_ide_api_light/src') diff --git a/crates/ra_ide_api_light/src/join_lines.rs b/crates/ra_ide_api_light/src/join_lines.rs index 970afd327..949ee1544 100644 --- a/crates/ra_ide_api_light/src/join_lines.rs +++ b/crates/ra_ide_api_light/src/join_lines.rs @@ -207,6 +207,29 @@ fn foo() { ); } + #[test] + #[ignore] // FIXME: https://github.com/rust-analyzer/rust-analyzer/issues/868 + fn join_lines_adds_comma_for_block_in_match_arm() { + check_join_lines( + r" +fn foo(e: Result) { + match e { + Ok(u) => <|>{ + u.foo() + } + Err(v) => v, + } +}", + r" +fn foo(e: Result) { + match e { + Ok(u) => <|>u.foo(), + Err(v) => v, + } +}", + ); + } + #[test] fn test_join_lines_use_items_left() { // No space after the '{' -- cgit v1.2.3