Massively reduce the amount of code needed for linter tests

This commit is contained in:
w0rp
2018-07-15 18:24:53 +01:00
parent 5155a35a80
commit a42999a639
138 changed files with 1447 additions and 3017 deletions

View File

@@ -1,16 +1,8 @@
Before:
runtime ale_linters/go/govet.vim
call ale#test#SetDirectory('/testplugin/test/command_callback')
call ale#assert#SetUpLinterTest('go', 'govet')
After:
Restore
call ale#linter#Reset()
call ale#test#RestoreDirectory()
call ale#assert#TearDownLinterTest()
Execute(The default command should be correct):
AssertEqual
\ 'cd ' . ale#Escape(expand('%:p:h')) . ' && '
\ . ' go vet .',
\ ale_linters#go#govet#GetCommand(bufnr(''))
AssertLinter 'go', 'cd ' . ale#Escape(expand('%:p:h')) . ' && go vet .'