diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-01-30 13:37:50 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-01-30 13:40:28 -0500 |
commit | 150859d71779f507db01ac791452e9f0a3d5a60f (patch) | |
tree | 46762fbd19fe15b8289e6b78e43f562a594e7df0 | |
parent | 647c9c558b2faad3cde4fe69501f1a2b72cc164a (diff) | |
download | rneovim-150859d71779f507db01ac791452e9f0a3d5a60f.tar.gz rneovim-150859d71779f507db01ac791452e9f0a3d5a60f.tar.bz2 rneovim-150859d71779f507db01ac791452e9f0a3d5a60f.zip |
test/old: rewrite method code in test_compiler.vim
Patch v8.1.1803 and related method patches are not ported yet.
Revert this commit when those patches are ported.
-rw-r--r-- | src/nvim/testdir/test_compiler.vim | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/nvim/testdir/test_compiler.vim b/src/nvim/testdir/test_compiler.vim index 0d135c3811..d361205baa 100644 --- a/src/nvim/testdir/test_compiler.vim +++ b/src/nvim/testdir/test_compiler.vim @@ -38,9 +38,10 @@ func Test_compiler() endfunc func GetCompilerNames() - return glob('$VIMRUNTIME/compiler/*.vim', 0, 1) - \ ->map({i, v -> substitute(v, '.*[\\/]\([a-zA-Z0-9_\-]*\).vim', '\1', '')}) - \ ->sort() + " 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() @@ -53,7 +54,8 @@ func Test_compiler_without_arg() endfunc func Test_compiler_completion() - let clist = GetCompilerNames()->join(' ') + " let clist = GetCompilerNames()->join(' ') + let clist = join(GetCompilerNames(), ' ') call feedkeys(":compiler \<C-A>\<C-B>\"\<CR>", 'tx') call assert_match('^"compiler ' .. clist .. '$', @:) |