comparison runtime/syntax/testdir/input/java_string.java @ 34468:f5d114f7440e

runtime(java): Recognise text blocks (#14128) Commit: https://github.com/vim/vim/commit/b3030b653bbdc08c91138001d1987d804f6ebf46 Author: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com> Date: Sun Mar 3 17:51:01 2024 +0300 runtime(java): Recognise text blocks (https://github.com/vim/vim/issues/14128) Also, accept as valid the space escape sequence `\s`. Also, consistently use the claimed `javaDebug` prefix for syntax group definitions kept under `g:java_highlight_debug`. Since `javaStringError` is commented out for its generality, let's comment out `javaDebugStringError`, its copy, as well. References: https://openjdk.org/jeps/378 https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-3.10.7 Closes #10910. Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 03 Mar 2024 16:00:10 +0100
parents
children 728675946924
comparison
equal deleted inserted replaced
34467:95da9260ac66 34468:f5d114f7440e
1 class StringTests
2 {
3 static {
4 String s1 = "A quick brown fox jumps over the lazy dog";
5 String s2 = "\"Woof\s!\"";
6 String s3 = """
7 A\s\
8 quick \
9 brown\s\
10 fox \
11 jumps\s\
12 over \
13 the\s\
14 lazy \
15 dog""";
16 String s4 = """
17 "Woof\s!\"""";
18 String s5 = """
19 String s3 = \"""
20 A\\s\\
21 quick \\
22 brown\\s\\
23 fox \\
24 jumps\\s\\
25 over \\
26 the\\s\\
27 lazy \\
28 dog\""";""";
29
30 // There are SPACE, FF, HT, CR, and LF after """.
31 String empty = """
32 """;
33
34 System.out.println("""
35 "
36 ""
37 ""\u005c"
38 ""\u005c""
39 ""\"\u0022\u0022
40 ""\"""\u005c\u0022
41 ""\"""\""
42 ""\"""\""\"""");
43 }
44 }