This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 92c76fee90a3590f0edecd0e5716c3a83e7e974b
Author: Josh Tynjala <[email protected]>
AuthorDate: Wed Oct 6 10:14:49 2021 -0700

    formatter: extra test for block comments
---
 .../royale/formatter/TestMultiLineComment.java     | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git 
a/formatter/src/test/java/org/apache/royale/formatter/TestMultiLineComment.java 
b/formatter/src/test/java/org/apache/royale/formatter/TestMultiLineComment.java
index c2fa2c2..c3f8b24 100644
--- 
a/formatter/src/test/java/org/apache/royale/formatter/TestMultiLineComment.java
+++ 
b/formatter/src/test/java/org/apache/royale/formatter/TestMultiLineComment.java
@@ -85,4 +85,27 @@ public class TestMultiLineComment extends BaseFormatterTests 
{
                                result);
        }
 
+       @Test
+       public void testPreserveMultilineFormatting() {
+               FORMATTER formatter = new FORMATTER();
+               formatter.insertSpaceAfterKeywordsInControlFlowStatements = 
true;
+               formatter.placeOpenBraceOnNewLine = true;
+               formatter.insertSpaces = false;
+               String result = formatter.formatText(
+               // @formatter:off
+                       "/*\n" +
+                       "\tthis is a comment\n" +
+                       "*/",
+                       // @formatter:on
+                       problems
+               );
+               assertEquals(
+               // @formatter:off
+                               "/*\n" +
+                               "\tthis is a comment\n" +
+                               "*/",
+                               // @formatter:on
+                               result);
+       }
+
 }

Reply via email to