diff options
author | Matthieu Coudron <teto@users.noreply.github.com> | 2021-01-30 21:31:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-30 21:31:20 +0100 |
commit | c4d0211fea7abfc9e52262f3fe21b90318a0f0bc (patch) | |
tree | 46762fbd19fe15b8289e6b78e43f562a594e7df0 | |
parent | ad98b84008586a1863e8b05b3db6d2c6c7ad4db8 (diff) | |
parent | 150859d71779f507db01ac791452e9f0a3d5a60f (diff) | |
download | rneovim-c4d0211fea7abfc9e52262f3fe21b90318a0f0bc.tar.gz rneovim-c4d0211fea7abfc9e52262f3fe21b90318a0f0bc.tar.bz2 rneovim-c4d0211fea7abfc9e52262f3fe21b90318a0f0bc.zip |
Merge pull request #13852 from janlazo/vim-8.2.2037
vim-patch:8.2.{2037,2038}
-rw-r--r-- | src/nvim/testdir/test_compiler.vim | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/nvim/testdir/test_compiler.vim b/src/nvim/testdir/test_compiler.vim index 9101f8cfa0..d361205baa 100644 --- a/src/nvim/testdir/test_compiler.vim +++ b/src/nvim/testdir/test_compiler.vim @@ -37,17 +37,27 @@ func Test_compiler() bw! endfunc +func GetCompilerNames() + " return glob('$VIMRUNTIME/compiler/*.vim', 0, 1) + " \ ->map({i, v -> substitute(v, '.*[\\/]\([a-zA-Z0-9_\-]*\).vim', '\1', '')}) + " \ ->sort() + return sort(map(glob('$VIMRUNTIME/compiler/*.vim', 0, 1), {i, 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 func Test_compiler_completion() + " let clist = GetCompilerNames()->join(' ') + let clist = join(GetCompilerNames(), ' ') 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', @:) |