To: vim_dev@googlegroups.com Subject: Patch 8.2.2037 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2037 Problem: Compiler test depends on list of compiler plugins. Solution: Compare with the actual list of compiler plugins. Files: src/testdir/test_compiler.vim *** ../vim-8.2.2036/src/testdir/test_compiler.vim 2020-08-12 18:50:31.875655822 +0200 --- src/testdir/test_compiler.vim 2020-11-23 21:22:51.240601675 +0100 *************** *** 41,52 **** bw! 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]) endfunc " Test executing :compiler from the command line, not from a script --- 41,58 ---- 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')) ! 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,66 **** endfunc func Test_compiler_completion() call feedkeys(":compiler \\\"\", 'tx') ! call assert_match('^"compiler ant bcc .* xmlwf xo$', @:) call feedkeys(":compiler p\\\"\", 'tx') call assert_equal('"compiler pbx perl php pylint pyunit', @:) --- 65,73 ---- endfunc func Test_compiler_completion() + let clist = GetCompilerNames()->join(' ') call feedkeys(":compiler \\\"\", 'tx') ! call assert_match('^"compiler ' .. clist .. '$', @:) call feedkeys(":compiler p\\\"\", 'tx') call assert_equal('"compiler pbx perl php pylint pyunit', @:) *** ../vim-8.2.2036/src/version.c 2020-11-23 20:14:47.773734727 +0100 --- src/version.c 2020-11-23 21:23:51.040545146 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2037, /**/ -- What the word 'politics' means: 'Poli' in Latin meaning 'many' and 'tics' meaning 'bloodsucking creatures'. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///