summaryrefslogtreecommitdiffstats
path: root/runtime/syntax/testdir/input/java_string.java
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/syntax/testdir/input/java_string.java')
-rw-r--r--runtime/syntax/testdir/input/java_string.java44
1 files changed, 44 insertions, 0 deletions
diff --git a/runtime/syntax/testdir/input/java_string.java b/runtime/syntax/testdir/input/java_string.java
new file mode 100644
index 0000000000..51c30b9da8
--- /dev/null
+++ b/runtime/syntax/testdir/input/java_string.java
@@ -0,0 +1,44 @@
+class StringTests
+{
+ static {
+ String s1 = "A quick brown fox jumps over the lazy dog";
+ String s2 = "\"Woof\s!\"";
+ String s3 = """
+ A\s\
+ quick \
+ brown\s\
+ fox \
+ jumps\s\
+ over \
+ the\s\
+ lazy \
+ dog""";
+ String s4 = """
+ "Woof\s!\"""";
+ String s5 = """
+ String s3 = \"""
+ A\\s\\
+ quick \\
+ brown\\s\\
+ fox \\
+ jumps\\s\\
+ over \\
+ the\\s\\
+ lazy \\
+ dog\""";""";
+
+ // There are SPACE, FF, HT, CR, and LF after """.
+ String empty = """
+ """;
+
+ System.out.println("""
+ "
+ ""
+ ""\u005c"
+ ""\u005c""
+ ""\"\u0022\u0022
+ ""\"""\u005c\u0022
+ ""\"""\""
+ ""\"""\""\"""");
+ }
+}