annotate src/testdir/test_codestyle.vim @ 32395:2ed95122d59c v9.0.1529

patch 9.0.1529: code style test doesn't check for space after "if" Commit: https://github.com/vim/vim/commit/c9471b18728b1b37c04845ca2bc59fc981308b2d Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 9 15:00:00 2023 +0100 patch 9.0.1529: code style test doesn't check for space after "if" Problem: Code style test doesn't check for space after "if". Solution: Add a test for space.
author Bram Moolenaar <Bram@vim.org>
date Tue, 09 May 2023 16:15:05 +0200
parents 9fec560a63ef
children 0a0b9371957f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31804
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Test for checking the source code style.
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 def Test_source_files()
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 for fname in glob('../*.[ch]', 0, 1)
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 exe 'edit ' .. fname
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 cursor(1, 1)
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 var lnum = search(' \t')
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 assert_equal(0, lnum, fname .. ': space before tab')
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 cursor(1, 1)
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 lnum = search('\s$')
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 assert_equal(0, lnum, fname .. ': trailing white space')
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 # some files don't stick to the Vim style rules
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 if fname =~ 'iscygpty.c'
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 continue
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 endif
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 # Examples in comments use "condition) {", skip them.
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 # Skip if a double quote or digit comes after the "{".
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 # Skip specific string used in os_unix.c.
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 # Also skip fold markers.
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 var skip = 'getline(".") =~ "condition) {" || getline(".") =~ "vimglob_func" || getline(".") =~ "{\"" || getline(".") =~ "{\\d" || getline(".") =~ "{{{"'
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 cursor(1, 1)
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 lnum = search(')\s*{', '', 0, 0, skip)
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 assert_equal(0, lnum, fname .. ': curly after closing paren')
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 cursor(1, 1)
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 # Examples in comments use double quotes.
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 skip = "getline('.') =~ '\"'"
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 # Avoid examples that contain: "} else
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 lnum = search('[^"]}\s*else', '', 0, 0, skip)
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 assert_equal(0, lnum, fname .. ': curly before "else"')
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 cursor(1, 1)
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 lnum = search('else\s*{', '', 0, 0, skip)
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 assert_equal(0, lnum, fname .. ': curly after "else"')
32395
2ed95122d59c patch 9.0.1529: code style test doesn't check for space after "if"
Bram Moolenaar <Bram@vim.org>
parents: 32007
diff changeset
39
2ed95122d59c patch 9.0.1529: code style test doesn't check for space after "if"
Bram Moolenaar <Bram@vim.org>
parents: 32007
diff changeset
40 cursor(1, 1)
2ed95122d59c patch 9.0.1529: code style test doesn't check for space after "if"
Bram Moolenaar <Bram@vim.org>
parents: 32007
diff changeset
41 lnum = search('\<\(if\|while\|for\)(', '', 0, 0, skip)
2ed95122d59c patch 9.0.1529: code style test doesn't check for space after "if"
Bram Moolenaar <Bram@vim.org>
parents: 32007
diff changeset
42 assert_equal(0, lnum, fname .. ': missing white space after "if"/"while"/"for"')
31804
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 endfor
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 bwipe!
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 enddef
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47
31849
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
48 def Test_test_files()
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
49 for fname in glob('*.vim', 0, 1)
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
50 exe 'edit ' .. fname
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
51
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
52 # some files intentionally have misplaced white space
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
53 if fname =~ 'test_cindent.vim' || fname =~ 'test_join.vim'
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
54 continue
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
55 endif
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
56
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
57 # skip files that are known to have a space before a tab
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
58 if fname !~ 'test_comments.vim'
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
59 && fname !~ 'test_listchars.vim'
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
60 && fname !~ 'test_visual.vim'
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
61 cursor(1, 1)
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
62 var lnum = search(fname =~ "test_regexp_latin" ? '[^รก] \t' : ' \t')
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
63 assert_equal(0, lnum, 'testdir/' .. fname .. ': space before tab')
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
64 endif
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
65
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
66 # skip files that are known to have trailing white space
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
67 if fname !~ 'test_cmdline.vim'
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
68 && fname !~ 'test_let.vim'
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
69 && fname !~ 'test_tagjump.vim'
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
70 && fname !~ 'test_vim9_cmd.vim'
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
71 cursor(1, 1)
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
72 var lnum = search(
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
73 fname =~ 'test_vim9_assign.vim' ? '[^=]\s$'
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
74 : fname =~ 'test_vim9_class.vim' ? '[^)]\s$'
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
75 : fname =~ 'test_vim9_script.vim' ? '[^,:3]\s$'
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
76 : fname =~ 'test_visual.vim' ? '[^/]\s$'
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
77 : '[^\\]\s$')
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
78 assert_equal(0, lnum, 'testdir/' .. fname .. ': trailing white space')
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
79 endif
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
80 endfor
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
81
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
82 bwipe!
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
83 enddef
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31804
diff changeset
84
32007
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
85 def Test_help_files()
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
86 var lnum: number
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
87 set nowrapscan
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
88
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
89 for fpath in glob('../../runtime/doc/*.txt', 0, 1)
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
90 exe 'edit ' .. fpath
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
91
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
92 var fname = fnamemodify(fpath, ":t")
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
93
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
94 # todo.txt is for developers, it's not need a strictly check
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
95 # version*.txt is a history and large size, so it's not checked
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
96 if fname == 'todo.txt' || fname =~ 'version.*\.txt'
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
97 continue
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
98 endif
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
99
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
100 # Check for mixed tabs and spaces
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
101 cursor(1, 1)
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
102 while 1
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
103 lnum = search('[^/] \t')
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
104 if fname == 'visual.txt' && getline(lnum) =~ "STRING \tjkl"
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
105 || fname == 'usr_27.txt' && getline(lnum) =~ "\[^\? \t\]"
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
106 continue
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
107 endif
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
108 assert_equal(0, lnum, fpath .. ': space before tab')
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
109 if lnum == 0
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
110 break
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
111 endif
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
112 endwhile
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
113
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
114 # Check for unnecessary whitespace at the end of a line
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
115 cursor(1, 1)
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
116 while 1
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
117 lnum = search('[^/~\\]\s$')
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
118 # skip line that are known to have trailing white space
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
119 if fname == 'map.txt' && getline(lnum) =~ "unmap @@ $"
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
120 || fname == 'usr_12.txt' && getline(lnum) =~ "^\t/ \t$"
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
121 || fname == 'usr_41.txt' && getline(lnum) =~ "map <F4> o#include $"
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
122 || fname == 'change.txt' && getline(lnum) =~ "foobar bla $"
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
123 continue
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
124 endif
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
125 assert_equal(0, lnum, fpath .. ': trailing white space')
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
126 if lnum == 0
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
127 break
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
128 endif
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
129 endwhile
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
130
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
131 # TODO: Do check and fix help files
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
132 # # Check over 80 columns
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
133 # cursor(1, 1)
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
134 # while 1
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
135 # lnum = search('\%>80v.*$')
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
136 # assert_equal(0, lnum, fpath .. ': line over 80 columns')
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
137 # if lnum == 0
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
138 # break
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
139 # endif
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
140 # endwhile
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
141
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
142 endfor
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
143
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
144 set wrapscan&vim
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
145 bwipe!
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
146 enddef
9fec560a63ef patch 9.0.1335: no test for bad use of spaces in help files
Bram Moolenaar <Bram@vim.org>
parents: 31849
diff changeset
147
31804
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
148
50555279168b patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
149 " vim: shiftwidth=2 sts=2 expandtab