This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/command_callback/test_govet_command_callback.vader

35 lines
904 B
Text
Raw Normal View History

Before:
Save g:ale_go_go_executable
Save g:ale_go_govet_options
2019-08-02 08:09:10 +00:00
Save g:ale_go_go111module
call ale#assert#SetUpLinterTest('go', 'govet')
After:
Restore
2019-08-02 08:09:10 +00:00
unlet! b:ale_go_go111module
call ale#assert#TearDownLinterTest()
Execute(The default command should be correct):
2018-10-23 14:20:27 +00:00
AssertLinter 'go', ale#path#CdString(expand('%:p:h')) . ' go vet .'
Execute(Extra options should be supported):
let g:ale_go_govet_options = '--foo-bar'
2019-08-02 08:09:10 +00:00
2018-10-23 14:20:27 +00:00
AssertLinter 'go', ale#path#CdString(expand('%:p:h')) . ' go vet --foo-bar .'
Execute(The executable should be configurable):
let g:ale_go_go_executable = 'foobar'
2019-08-02 08:09:10 +00:00
2018-10-23 14:20:27 +00:00
AssertLinter 'foobar', ale#path#CdString(expand('%:p:h')) . ' foobar vet .'
Execute(Go environment variables should be supported):
let b:ale_go_go111module = 'on'
2019-08-02 08:09:10 +00:00
AssertLinter 'go',
\ ale#path#CdString(expand('%:p:h')) . ' '
\ . ale#Env('GO111MODULE', 'on')
\ . 'go vet .'