diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:05:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:05:51 +0000 |
commit | 3b8b0072dafee1c363713688a821982167185fa0 (patch) | |
tree | 7ae89cb789d77aecb88f4785011115d820f9bf49 /runtime/syntax/testdir/input | |
parent | Adding upstream version 2:9.1.0698. (diff) | |
download | vim-upstream.tar.xz vim-upstream.zip |
Adding upstream version 2:9.1.0709.upstream/2%9.1.0709upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/syntax/testdir/input')
-rw-r--r-- | runtime/syntax/testdir/input/java_previews_430.java | 68 | ||||
-rw-r--r-- | runtime/syntax/testdir/input/java_string.java | 62 | ||||
-rw-r--r-- | runtime/syntax/testdir/input/vim_ex_range.vim | 6 |
3 files changed, 75 insertions, 61 deletions
diff --git a/runtime/syntax/testdir/input/java_previews_430.java b/runtime/syntax/testdir/input/java_previews_430.java new file mode 100644 index 0000000..15d8ba2 --- /dev/null +++ b/runtime/syntax/testdir/input/java_previews_430.java @@ -0,0 +1,68 @@ +// VIM_TEST_SETUP let g:java_syntax_previews = [430] + + + +class StringTemplateTests // JDK 21+ (--enable-preview --release 21). +{ + static { + System.out.println(STR.""" + " + \{"\"\""} + \{"\"\""}\{"\u005c\u0022"} + \{"\"\""}\{"\u005c\u0022"}" + \{"\"\""}\"\{"\u005c\u0022\u005c\u0022"} + \{"\"\""}\"\{"\"\""}\{"\u005c\u0022"} + \{"\"\""}\"\{"\"\""}\"" + \{"\"\""}\"\{"\"\""}\""\""""); + + String woof = "Woof", dog = "dog", fox = "fox"; + + String s1 = STR + ."A quick brown \{fox} jumps over the lazy \{dog}"; + String s2 = STR.process(StringTemplate.RAW + ."\"\{woof}\s!\""); + String s3 = STR.""" + A\s\ + quick \ + brown\s\ + \{fox} \ + jumps\s\ + over \ + the\s\ + lazy \ + \{dog}"""; + String s4 = STR.process(StringTemplate.RAW + . + """ + "\{woof}\s!\""""); + String s5 = java.util.FormatProcessor.FMT + . "%-14s\{"A\s" + STR . "quick" + "brown"}%s\{fox} " + + java.util.FormatProcessor.FMT + . "%-20s\{"jumps\sover the\s" + + STR . "lazy"}%s\{dog}"; + String s6 = STR.""" + \"\{ // A nested comment. + (new java.util.function.Function<String, String>() { + public String apply(String bay) { return bay; }; + }).apply(woof) + }\s!\""""; + String s7 = java.util.FormatProcessor.FMT + .""" + %-14s\{STR.""" + A\s\ + \{ "quick" } \ + brown"""}\ + %s\{ fox } \ + %-20s\{STR.""" + jumps\s\ + over \ + the\s\ + \{ "lazy" } """}\ + %s\{ dog }"""; + String s8 = STR + ."\"\{ /* A nested comment. */ + ((java.util.function.Function<String, String>) bay -> bay) + .apply(woof) + }\s!\""; + } +} diff --git a/runtime/syntax/testdir/input/java_string.java b/runtime/syntax/testdir/input/java_string.java index 43a7a05..51c30b9 100644 --- a/runtime/syntax/testdir/input/java_string.java +++ b/runtime/syntax/testdir/input/java_string.java @@ -1,4 +1,4 @@ -class StringTests // JDK 21+ (--enable-preview --release 21). +class StringTests { static { String s1 = "A quick brown fox jumps over the lazy dog"; @@ -40,65 +40,5 @@ class StringTests // JDK 21+ (--enable-preview --release 21). ""\"""\u005c\u0022 ""\"""\"" ""\"""\""\""""); - - System.out.println(STR.""" - " - \{"\"\""} - \{"\"\""}\{"\u005c\u0022"} - \{"\"\""}\{"\u005c\u0022"}" - \{"\"\""}\"\{"\u005c\u0022\u005c\u0022"} - \{"\"\""}\"\{"\"\""}\{"\u005c\u0022"} - \{"\"\""}\"\{"\"\""}\"" - \{"\"\""}\"\{"\"\""}\""\""""); // JDK 21+. - - String woof = "Woof", dog = "dog", fox = "fox"; - - String s6 = STR - ."A quick brown \{fox} jumps over the lazy \{dog}"; - String s7 = STR.process(StringTemplate.RAW - ."\"\{woof}\s!\""); - String s8 = STR.""" - A\s\ - quick \ - brown\s\ - \{fox} \ - jumps\s\ - over \ - the\s\ - lazy \ - \{dog}"""; - String s9 = STR.process(StringTemplate.RAW - . - """ - "\{woof}\s!\""""); - String s10 = java.util.FormatProcessor.FMT - . "%-14s\{"A\s" + STR . "quick" + "brown"}%s\{fox} " - + java.util.FormatProcessor.FMT - . "%-20s\{"jumps\sover the\s" - + STR . "lazy"}%s\{dog}"; - String s11 = STR.""" - \"\{ // A nested comment. - (new java.util.function.Function<String, String>() { - public String apply(String bay) { return bay; }; - }).apply(woof) - }\s!\""""; - String s12 = java.util.FormatProcessor.FMT - .""" - %-14s\{STR.""" - A\s\ - \{ "quick" } \ - brown"""}\ - %s\{ fox } \ - %-20s\{STR.""" - jumps\s\ - over \ - the\s\ - \{ "lazy" } """}\ - %s\{ dog }"""; - String s13 = STR - ."\"\{ /* A nested comment. */ - ((java.util.function.Function<String, String>) bay -> bay) - .apply(woof) - }\s!\""; } } diff --git a/runtime/syntax/testdir/input/vim_ex_range.vim b/runtime/syntax/testdir/input/vim_ex_range.vim new file mode 100644 index 0000000..3383702 --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_range.vim @@ -0,0 +1,6 @@ +" Ex command ranges + +'<,'>print +'(,')print +'{,'}print +'[,']print |