From 69011b90d8e9d15dbf45479df2f4f08658970a16 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Wed, 25 Sep 2019 01:19:55 +0200 Subject: [jdk13] Added support for printing text blocks (triple quoted strings) in text block form --- test/pretty/resource/after/TextBlocks.java | 25 +++++++++++++++++++++++++ test/pretty/resource/before/TextBlocks.java | 24 ++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 test/pretty/resource/after/TextBlocks.java create mode 100644 test/pretty/resource/before/TextBlocks.java (limited to 'test/pretty/resource') diff --git a/test/pretty/resource/after/TextBlocks.java b/test/pretty/resource/after/TextBlocks.java new file mode 100644 index 00000000..4d2fc272 --- /dev/null +++ b/test/pretty/resource/after/TextBlocks.java @@ -0,0 +1,25 @@ +public class TextBlocks { + private String example = """ + This should not be indented. + line 2 + line 3 + """; + + private String ex2 = """ + This should be though. + """; + + private String ex3 = "This is a simple\nstring"; + + private String ex4 = """ + """; + + private String bizarroDent = """ + foo + bar""" + "hey" + """ + weird!"""; + + private String stringFolding = "hmmm" + """ + line1 + line2"""; +} diff --git a/test/pretty/resource/before/TextBlocks.java b/test/pretty/resource/before/TextBlocks.java new file mode 100644 index 00000000..247621c0 --- /dev/null +++ b/test/pretty/resource/before/TextBlocks.java @@ -0,0 +1,24 @@ +// version 13: +public class TextBlocks { + private String example = """ + This should not be indented.\nline 2 + line 3 + """; + + private String ex2 = """ + This should be though. + """; + + private String ex3 = "This is a simple\nstring"; + + private String ex4 = """ + """; + + private String bizarroDent = """ + foo\n bar""" + "hey" + """ + weird!"""; + + private String stringFolding = "hmmm" + """ + line1 + line2"""; +} -- cgit