Mercurial > vim
annotate src/testdir/test_codestyle.vim @ 32295:bea4ebf594c6 v9.0.1479
patch 9.0.1479: small source file problems; outdated list of distrib. files
Commit: https://github.com/vim/vim/commit/f39d9e9dca443e42920066be3a98fd9780e4ed33
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 22 22:54:40 2023 +0100
patch 9.0.1479: small source file problems; outdated list of distrib. files
Problem: Small source file problems; outdated list of distributed files.
Solution: Small updates to source files and list of distributed files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 23 Apr 2023 00:00:04 +0200 |
parents | 9fec560a63ef |
children | 2ed95122d59c |
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"') |
50555279168b
patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
39 endfor |
50555279168b
patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
40 |
50555279168b
patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
41 bwipe! |
50555279168b
patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
42 enddef |
50555279168b
patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
43 |
31849
dbec60b8c253
patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents:
31804
diff
changeset
|
44 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
|
45 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
|
46 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
|
47 |
dbec60b8c253
patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents:
31804
diff
changeset
|
48 # 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
|
49 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
|
50 continue |
dbec60b8c253
patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents:
31804
diff
changeset
|
51 endif |
dbec60b8c253
patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents:
31804
diff
changeset
|
52 |
dbec60b8c253
patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents:
31804
diff
changeset
|
53 # 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
|
54 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
|
55 && 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
|
56 && 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
|
57 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
|
58 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
|
59 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
|
60 endif |
dbec60b8c253
patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents:
31804
diff
changeset
|
61 |
dbec60b8c253
patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents:
31804
diff
changeset
|
62 # 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
|
63 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
|
64 && 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
|
65 && 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
|
66 && 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
|
67 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
|
68 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
|
69 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
|
70 : 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
|
71 : 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
|
72 : 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
|
73 : '[^\\]\s$') |
dbec60b8c253
patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents:
31804
diff
changeset
|
74 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
|
75 endif |
dbec60b8c253
patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents:
31804
diff
changeset
|
76 endfor |
dbec60b8c253
patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents:
31804
diff
changeset
|
77 |
dbec60b8c253
patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents:
31804
diff
changeset
|
78 bwipe! |
dbec60b8c253
patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents:
31804
diff
changeset
|
79 enddef |
dbec60b8c253
patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents:
31804
diff
changeset
|
80 |
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
|
81 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
|
82 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
|
83 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
|
84 |
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 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
|
86 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
|
87 |
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 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
|
89 |
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 # 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
|
91 # 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
|
92 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
|
93 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
|
94 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
|
95 |
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 # 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
|
97 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
|
98 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
|
99 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
|
100 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
|
101 || 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
|
102 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
|
103 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
|
104 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
|
105 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
|
106 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
|
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 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
|
109 |
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 # 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
|
111 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
|
112 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
|
113 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
|
114 # 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
|
115 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
|
116 || 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
|
117 || 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
|
118 || 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
|
119 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
|
120 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
|
121 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
|
122 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
|
123 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
|
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 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
|
126 |
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 # 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
|
128 # # 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
|
129 # 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
|
130 # 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
|
131 # 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
|
132 # 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
|
133 # 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
|
134 # 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
|
135 # 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
|
136 # 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
|
137 |
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 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
|
139 |
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 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
|
141 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
|
142 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
|
143 |
31804
50555279168b
patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
144 |
50555279168b
patch 9.0.1234: the code style has to be checked manually
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
145 " vim: shiftwidth=2 sts=2 expandtab |