summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_codestyle.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:05:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:05:15 +0000
commit6e9cd6b491267e6dff3e3f3f37d8af5f28e40672 (patch)
tree35661af16c4a0ef2a9a8e225d2d5cc82605ea289 /src/testdir/test_codestyle.vim
parentAdding upstream version 2:9.1.0496. (diff)
downloadvim-6e9cd6b491267e6dff3e3f3f37d8af5f28e40672.tar.xz
vim-6e9cd6b491267e6dff3e3f3f37d8af5f28e40672.zip
Adding upstream version 2:9.1.0698.upstream/2%9.1.0698
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/testdir/test_codestyle.vim')
-rw-r--r--src/testdir/test_codestyle.vim12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/testdir/test_codestyle.vim b/src/testdir/test_codestyle.vim
index a455264..83f52ef 100644
--- a/src/testdir/test_codestyle.vim
+++ b/src/testdir/test_codestyle.vim
@@ -28,6 +28,13 @@ def Test_source_files()
g:ignoreSwapExists = 'e'
exe 'edit ' .. fname
+ # Some files are generated files and may contain space errors.
+ if fname =~ 'dlldata.c'
+ || fname =~ 'if_ole.h'
+ || fname =~ 'iid_ole.c'
+ continue
+ endif
+
PerformCheck(fname, ' \t', 'space before Tab', '')
PerformCheck(fname, '\s$', 'trailing white space', '')
@@ -68,7 +75,8 @@ def Test_test_files()
&& fname !~ 'test_listchars.vim'
&& fname !~ 'test_visual.vim'
cursor(1, 1)
- var lnum = search(fname =~ "test_regexp_latin" ? '[^á] \t' : ' \t')
+ var skip = 'getline(".") =~ "codestyle: ignore"'
+ var lnum = search(fname =~ "test_regexp_latin" ? '[^á] \t' : ' \t', 'W', 0, 0, skip)
ReportError('testdir/' .. fname, lnum, 'space before Tab')
endif
@@ -155,4 +163,4 @@ def Test_help_files()
enddef
-" vim: shiftwidth=2 sts=2 expandtab
+" vim: shiftwidth=2 sts=2 expandtab nofoldenable