mirror of
https://github.com/amix/vimrc
synced 2025-07-12 06:05:01 +08:00
Updated plugins
This commit is contained in:
@ -54,9 +54,14 @@ function! ale#assert#Linter(expected_executable, expected_command) abort
|
||||
endif
|
||||
else
|
||||
let l:command = ale#linter#GetCommand(l:buffer, l:linter)
|
||||
endif
|
||||
|
||||
if type(l:command) is v:t_string
|
||||
" Replace %e with the escaped executable, so tests keep passing after
|
||||
" linters are changed to use %e.
|
||||
let l:command = substitute(l:command, '%e', '\=ale#Escape(l:executable)', 'g')
|
||||
else
|
||||
call map(l:command, 'substitute(v:val, ''%e'', ''\=ale#Escape(l:executable)'', ''g'')')
|
||||
endif
|
||||
|
||||
AssertEqual
|
||||
@ -126,7 +131,9 @@ function! ale#assert#SetUpLinterTest(filetype, name) abort
|
||||
|
||||
execute 'runtime ale_linters/' . a:filetype . '/' . a:name . '.vim'
|
||||
|
||||
call ale#test#SetDirectory('/testplugin/test/command_callback')
|
||||
if !exists('g:dir')
|
||||
call ale#test#SetDirectory('/testplugin/test/command_callback')
|
||||
endif
|
||||
|
||||
command! -nargs=+ WithChainResults :call ale#assert#WithChainResults(<args>)
|
||||
command! -nargs=+ AssertLinter :call ale#assert#Linter(<args>)
|
||||
@ -140,14 +147,33 @@ function! ale#assert#TearDownLinterTest() abort
|
||||
unlet! g:ale_create_dummy_temporary_file
|
||||
let s:chain_results = []
|
||||
|
||||
delcommand WithChainResults
|
||||
delcommand AssertLinter
|
||||
delcommand AssertLinterNotExecuted
|
||||
delcommand AssertLSPOptions
|
||||
delcommand AssertLSPLanguage
|
||||
delcommand AssertLSPProject
|
||||
if exists(':WithChainResults')
|
||||
delcommand WithChainResults
|
||||
endif
|
||||
|
||||
call ale#test#RestoreDirectory()
|
||||
if exists(':AssertLinter')
|
||||
delcommand AssertLinter
|
||||
endif
|
||||
|
||||
if exists(':AssertLinterNotExecuted')
|
||||
delcommand AssertLinterNotExecuted
|
||||
endif
|
||||
|
||||
if exists(':AssertLSPOptions')
|
||||
delcommand AssertLSPOptions
|
||||
endif
|
||||
|
||||
if exists(':AssertLSPLanguage')
|
||||
delcommand AssertLSPLanguage
|
||||
endif
|
||||
|
||||
if exists(':AssertLSPProject')
|
||||
delcommand AssertLSPProject
|
||||
endif
|
||||
|
||||
if exists('g:dir')
|
||||
call ale#test#RestoreDirectory()
|
||||
endif
|
||||
|
||||
Restore
|
||||
|
||||
|
Reference in New Issue
Block a user