diff options
author | Jay Arthanareeswaran | 2019-10-16 11:28:27 +0000 |
---|---|---|
committer | Jay Arthanareeswaran | 2019-10-16 11:47:51 +0000 |
commit | ba59a29d7bb455f98495dc317d2e9b1dbc78925c (patch) | |
tree | 14837497e28bd68820d9a7b858dff20a97edb96f /org.eclipse.jdt.tests.latestBREE | |
parent | 55f0650606275cab67b539f058d1e4130fba021e (diff) | |
download | eclipse.jdt.core-ba59a29d7bb455f98495dc317d2e9b1dbc78925c.tar.gz eclipse.jdt.core-ba59a29d7bb455f98495dc317d2e9b1dbc78925c.tar.xz eclipse.jdt.core-ba59a29d7bb455f98495dc317d2e9b1dbc78925c.zip |
application
Change-Id: I2b8979666292aff63eae31797942b7ffe18ad20f
Signed-off-by: Jay Arthanareeswaran <jarthana@in.ibm.com>
Diffstat (limited to 'org.eclipse.jdt.tests.latestBREE')
-rw-r--r-- | org.eclipse.jdt.tests.latestBREE/src/org/eclipse/jdt/core/tests/compiler/regression/latest/TextBlockTest.java | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/org.eclipse.jdt.tests.latestBREE/src/org/eclipse/jdt/core/tests/compiler/regression/latest/TextBlockTest.java b/org.eclipse.jdt.tests.latestBREE/src/org/eclipse/jdt/core/tests/compiler/regression/latest/TextBlockTest.java index 7b5c1d1cb9..4e994b3a08 100644 --- a/org.eclipse.jdt.tests.latestBREE/src/org/eclipse/jdt/core/tests/compiler/regression/latest/TextBlockTest.java +++ b/org.eclipse.jdt.tests.latestBREE/src/org/eclipse/jdt/core/tests/compiler/regression/latest/TextBlockTest.java @@ -235,7 +235,7 @@ public class TextBlockTest extends AbstractRegressionTest { " line 1\n" + " line 2\r" + " \r" + - " line 3\n\"\"\";\n" + + " line 3\"\"\";\n" + " public static void main(String[] args) {\n" + " System.out.println(textb);\n" + " }\n" + @@ -249,6 +249,35 @@ public class TextBlockTest extends AbstractRegressionTest { new String[] {"--enable-preview"}); } /* + * Positive - Multi line text block with varying indentation + * and \n and \r + */ + public void test008a() { + runConformTest( + new String[] { + "X.java", + "public class X {\n" + + " public static String textb = \"\"\"\n" + + " line 1\n" + + " line 2\r" + + " \r" + + " line 3\n\"\"\";\n" + + " public static void main(String[] args) {\n" + + " System.out.print(\"<\");\n" + + " System.out.print(textb);\n" + + " System.out.print(\">\");\n" + + " }\n" + + "}\n" + }, + "< line 1\n" + + " line 2\n" + + " \n" + + " line 3\n" + + ">", // the trailing whitespace is trimmed by the test framework + null, + new String[] {"--enable-preview"}); + } + /* * positive - using unescaped '"' in text block */ public void test009() { @@ -468,7 +497,7 @@ public class TextBlockTest extends AbstractRegressionTest { */ @SuppressWarnings("removal") public void test016b() { - String text = " <html>\n" + + String text = "<html>\n" + " <body>\n" + " <p>Hello, world</p>\n" + " </body>\n" + @@ -723,8 +752,7 @@ public class TextBlockTest extends AbstractRegressionTest { " public static void main(String[] args) {\n" + " System.out.println(textb);\n" + " }\n" + - " } \n" + - " \"\"\"\n" + + " }\"\"\"" + " }, \n" + " \"\",\n" + " null,\n" + |