summaryrefslogtreecommitdiffstats
path: root/runtime/syntax/testdir/input/java_string.java
blob: 51c30b9da81dc9d9d92c5cec5a95d6b401099ab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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
		""\"""\""
		""\"""\""\"""");
	}
}