summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAliaksei Budavei <0x000c70@gmail.com>2024-03-18 20:39:32 +0100
committerChristian Brabandt <cb@256bit.org>2024-03-18 20:40:54 +0100
commita2addebca359a35044bb60bebb91c258a94f3610 (patch)
treea97144aa7d97f7b32048d48ad815e7a993af1ad0
parentef21bcaab145d6b22fb7c823607de23700f82653 (diff)
runtime(syntax-tests): include missing changes
related: #14215 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
-rw-r--r--runtime/syntax/testdir/README.txt8
-rw-r--r--runtime/syntax/testdir/input/c.c2
-rw-r--r--runtime/syntax/testdir/runtest.vim9
3 files changed, 10 insertions, 9 deletions
diff --git a/runtime/syntax/testdir/README.txt b/runtime/syntax/testdir/README.txt
index 40757759b7..9c1264831b 100644
--- a/runtime/syntax/testdir/README.txt
+++ b/runtime/syntax/testdir/README.txt
@@ -34,7 +34,7 @@ Make sure to include some interesting constructs with plenty of complicated
highlighting. Optionally, pre-configure the testing environment by including
setup commands at the top of the input file. The format for these lines is:
- TEST_SETUP {command}
+ VIM_TEST_SETUP {command}
where {command} is any valid Ex command, which extends to the end of the line.
The first 20 lines of the input file are ALWAYS scanned for setup commands and
@@ -44,8 +44,8 @@ errors in the input file but this is not required.
Continuing the Java example:
- // TEST_SETUP let g:java_space_errors = 1
- // TEST_SETUP let g:java_minlines = 5
+ // VIM_TEST_SETUP let g:java_space_errors = 1
+ // VIM_TEST_SETUP let g:java_minlines = 5
class Test { }
As an alternative, setup commands can be included in an external Vim script
@@ -59,7 +59,7 @@ an "input/setup/java.vim" script file with the following lines:
let g:java_minlines = 5
Both inline setup commands and setup scripts may be used at the same time, the
-script file will be sourced before any TEST_SETUP commands are executed.
+script file will be sourced before any VIM_TEST_SETUP commands are executed.
If there is no further setup required, you can now run the tests:
diff --git a/runtime/syntax/testdir/input/c.c b/runtime/syntax/testdir/input/c.c
index ede2cafb3d..595721b0a5 100644
--- a/runtime/syntax/testdir/input/c.c
+++ b/runtime/syntax/testdir/input/c.c
@@ -1,5 +1,5 @@
/* vi:set ts=8 sts=4 sw=4 noet:
- * TEST_SETUP let g:c_comment_strings = 1
+ * VIM_TEST_SETUP let g:c_comment_strings = 1
*
* VIM - Vi IMproved by Bram Moolenaar
*
diff --git a/runtime/syntax/testdir/runtest.vim b/runtime/syntax/testdir/runtest.vim
index 4802315bae..e1cfdcfe1c 100644
--- a/runtime/syntax/testdir/runtest.vim
+++ b/runtime/syntax/testdir/runtest.vim
@@ -149,17 +149,18 @@ func RunTest()
func SetUpVim()
call cursor(1, 1)
- " Defend against rogue TEST_SETUP commands.
+ " Defend against rogue VIM_TEST_SETUP commands.
for _ in range(20)
- let lnum = search('\<TEST_SETUP\>', 'eW', 20)
+ let lnum = search('\C\<VIM_TEST_SETUP\>', 'eW', 20)
if lnum < 1
break
endif
- exe substitute(getline(lnum), '.*TEST_SETUP', '', '')
+ exe substitute(getline(lnum), '\C.*\<VIM_TEST_SETUP\>', '', '')
endfor
call cursor(1, 1)
" BEGIN [runtime/defaults.vim]
- set display=truncate ruler scrolloff=5
+ " Also, disable italic highlighting to avoid issues on some terminals.
+ set display=truncate ruler scrolloff=5 t_ZH= t_ZR=
syntax on
" END [runtime/defaults.vim]
redraw!