• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Révision72e0ec552189b9f8f74ae85ca960db59570a9900 (tree)
l'heure2020-11-24 05:30:04
AuteurBram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Message de Log

patch 8.2.2037: compiler test depends on list of compiler plugins

Commit: https://github.com/vim/vim/commit/60bc8e7244080b7ead009cfabebc3401f272ddbe
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Nov 23 21:24:58 2020 +0100

patch 8.2.2037: compiler test depends on list of compiler plugins
Problem: Compiler test depends on list of compiler plugins.
Solution: Compare with the actual list of compiler plugins.

Change Summary

Modification

diff -r 85af9c781df0 -r 72e0ec552189 src/testdir/test_compiler.vim
--- a/src/testdir/test_compiler.vim Mon Nov 23 20:30:07 2020 +0100
+++ b/src/testdir/test_compiler.vim Mon Nov 23 21:30:04 2020 +0100
@@ -41,12 +41,18 @@
4141 bw!
4242 endfunc
4343
44+func GetCompilerNames()
45+ return glob('$VIMRUNTIME/compiler/*.vim', 0, 1)
46+ \ ->map({k, v -> substitute(v, '.*[\\/]\([a-zA-Z0-9_\-]*\).vim', '\1', '')})
47+endfunc
48+
4449 func Test_compiler_without_arg()
4550 let runtime = substitute($VIMRUNTIME, '\\', '/', 'g')
4651 let a = split(execute('compiler'))
47- call assert_match(runtime .. '/compiler/ant.vim$', a[0])
48- call assert_match(runtime .. '/compiler/bcc.vim$', a[1])
49- call assert_match(runtime .. '/compiler/xo.vim$', a[-1])
52+ let exp = GetCompilerNames()
53+ call assert_match(runtime .. '/compiler/' .. exp[0] .. '.vim$', a[0])
54+ call assert_match(runtime .. '/compiler/' .. exp[1] .. '.vim$', a[1])
55+ call assert_match(runtime .. '/compiler/' .. exp[-1] .. '.vim$', a[-1])
5056 endfunc
5157
5258 " Test executing :compiler from the command line, not from a script
@@ -59,8 +65,9 @@
5965 endfunc
6066
6167 func Test_compiler_completion()
68+ let clist = GetCompilerNames()->join(' ')
6269 call feedkeys(":compiler \<C-A>\<C-B>\"\<CR>", 'tx')
63- call assert_match('^"compiler ant bcc .* xmlwf xo$', @:)
70+ call assert_match('^"compiler ' .. clist .. '$', @:)
6471
6572 call feedkeys(":compiler p\<C-A>\<C-B>\"\<CR>", 'tx')
6673 call assert_equal('"compiler pbx perl php pylint pyunit', @:)
diff -r 85af9c781df0 -r 72e0ec552189 src/version.c
--- a/src/version.c Mon Nov 23 20:30:07 2020 +0100
+++ b/src/version.c Mon Nov 23 21:30:04 2020 +0100
@@ -751,6 +751,8 @@
751751 static int included_patches[] =
752752 { /* Add new patch number below this line */
753753 /**/
754+ 2037,
755+/**/
754756 2036,
755757 /**/
756758 2035,
Afficher sur ancien navigateur de dépôt.