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

33 lines
760 B
Text
Raw Permalink 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):
AssertLinter 'go', 'go vet .'
Execute(Extra options should be supported):
let g:ale_go_govet_options = '--foo-bar'
2019-08-02 08:09:10 +00:00
AssertLinterCwd '%s:h'
AssertLinter 'go', '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
AssertLinter 'foobar', '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#Env('GO111MODULE', 'on') . 'go vet .'