mirror of
https://github.com/neovim/neovim.git
synced 2026-03-26 10:22:00 +00:00
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.
This commit is contained in:
@@ -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 .. '$', @:)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user