diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-11-23 21:24:58 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-11-23 21:24:58 +0100 |
commit | 60bc8e7244080b7ead009cfabebc3401f272ddbe (patch) | |
tree | 7a82d7358f602251839261648483b69c1c4547fe /src | |
parent | 9e40c4b15ebfbc84947a3f34b1bd53e397b57f51 (diff) | |
download | vim-git-60bc8e7244080b7ead009cfabebc3401f272ddbe.tar.gz |
patch 8.2.2037: compiler test depends on list of compiler pluginsv8.2.2037
Problem: Compiler test depends on list of compiler plugins.
Solution: Compare with the actual list of compiler plugins.
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/test_compiler.vim | 15 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 13 insertions, 4 deletions
diff --git a/src/testdir/test_compiler.vim b/src/testdir/test_compiler.vim index 6bf5f1521..ffafd5be2 100644 --- a/src/testdir/test_compiler.vim +++ b/src/testdir/test_compiler.vim @@ -41,12 +41,18 @@ func Test_compiler() bw! endfunc +func GetCompilerNames() + return glob('$VIMRUNTIME/compiler/*.vim', 0, 1) + \ ->map({k, v -> substitute(v, '.*[\\/]\([a-zA-Z0-9_\-]*\).vim', '\1', '')}) +endfunc + func Test_compiler_without_arg() let runtime = substitute($VIMRUNTIME, '\\', '/', 'g') let a = split(execute('compiler')) - call assert_match(runtime .. '/compiler/ant.vim$', a[0]) - call assert_match(runtime .. '/compiler/bcc.vim$', a[1]) - call assert_match(runtime .. '/compiler/xo.vim$', a[-1]) + let exp = GetCompilerNames() + call assert_match(runtime .. '/compiler/' .. exp[0] .. '.vim$', a[0]) + call assert_match(runtime .. '/compiler/' .. exp[1] .. '.vim$', a[1]) + call assert_match(runtime .. '/compiler/' .. exp[-1] .. '.vim$', a[-1]) endfunc " Test executing :compiler from the command line, not from a script @@ -59,8 +65,9 @@ func Test_compiler_commandline() endfunc func Test_compiler_completion() + let clist = GetCompilerNames()->join(' ') call feedkeys(":compiler \<C-A>\<C-B>\"\<CR>", 'tx') - call assert_match('^"compiler ant bcc .* xmlwf xo$', @:) + call assert_match('^"compiler ' .. clist .. '$', @:) call feedkeys(":compiler p\<C-A>\<C-B>\"\<CR>", 'tx') call assert_equal('"compiler pbx perl php pylint pyunit', @:) diff --git a/src/version.c b/src/version.c index 3f79d3a85..95d450718 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2037, +/**/ 2036, /**/ 2035, |