From ba4d505f2b5c9a98b359254583b55360dbf0a263 Mon Sep 17 00:00:00 2001 From: Sam Snyder Date: Tue, 27 Oct 2020 19:15:49 -0700 Subject: [PATCH] Add disabled AutoFormat test which reproduces issue 63 --- .../openrewrite/java/tree/AutoFormatTest.kt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/rewrite-test/src/main/kotlin/org/openrewrite/java/tree/AutoFormatTest.kt b/rewrite-test/src/main/kotlin/org/openrewrite/java/tree/AutoFormatTest.kt index 4b2e3d572db..2c92b0ec710 100644 --- a/rewrite-test/src/main/kotlin/org/openrewrite/java/tree/AutoFormatTest.kt +++ b/rewrite-test/src/main/kotlin/org/openrewrite/java/tree/AutoFormatTest.kt @@ -430,4 +430,24 @@ interface AutoFormatTest : RefactorVisitorTest { } """ ) + + @Disabled("https://github.com/openrewrite/rewrite/issues/63") + @Test + fun separatesStatementsWithEmptyFormatting(jp: JavaParser) = assertRefactored( + jp, + visitorsMapped = listOf { a -> AutoFormat(a) }, + before = """ + public class D {public String foo() {String foo = "foo";foo = foo + foo;return foo;}} + """, + after = """ + public class D { + + public String foo() { + String foo = "foo"; + foo = foo + foo; + return foo; + } + } + """ + ) }