diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-05-09 15:00:00 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-05-09 15:00:00 +0100 |
commit | c9471b18728b1b37c04845ca2bc59fc981308b2d (patch) | |
tree | dafcc679138813e74a19d656f7a582d36e9d3ea3 /src/testdir | |
parent | dda01c05c2ded3f0d11703bd983a19b6ca7d5055 (diff) |
patch 9.0.1529: code style test doesn't check for space after "if"v9.0.1529
Problem: Code style test doesn't check for space after "if".
Solution: Add a test for space.
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_codestyle.vim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testdir/test_codestyle.vim b/src/testdir/test_codestyle.vim index ec476c038b..3553063494 100644 --- a/src/testdir/test_codestyle.vim +++ b/src/testdir/test_codestyle.vim @@ -36,6 +36,10 @@ def Test_source_files() cursor(1, 1) lnum = search('else\s*{', '', 0, 0, skip) assert_equal(0, lnum, fname .. ': curly after "else"') + + cursor(1, 1) + lnum = search('\<\(if\|while\|for\)(', '', 0, 0, skip) + assert_equal(0, lnum, fname .. ': missing white space after "if"/"while"/"for"') endfor bwipe! |