2018-02-04 13:55:09 +00:00
|
|
|
Before:
|
2018-09-19 18:33:23 +00:00
|
|
|
Save g:ale_go_go_executable
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('go', 'gobuild')
|
2018-02-04 13:55:09 +00:00
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
WithChainResults ['/foo/bar', '/foo/baz']
|
2018-02-04 13:55:09 +00:00
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
After:
|
2018-09-19 18:33:23 +00:00
|
|
|
Restore
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2018-02-04 13:55:09 +00:00
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
Execute(The default commands should be correct):
|
2018-08-22 23:08:33 +00:00
|
|
|
AssertLinter 'go',
|
2018-10-23 14:20:27 +00:00
|
|
|
\ ale#path#CdString(expand('%:p:h'))
|
2018-02-04 13:55:09 +00:00
|
|
|
\ . 'go test -c -o /dev/null ./'
|
|
|
|
|
|
|
|
Execute(Extra options should be supported):
|
|
|
|
let g:ale_go_gobuild_options = '--foo-bar'
|
|
|
|
|
2018-08-22 23:08:33 +00:00
|
|
|
AssertLinter 'go',
|
2018-10-23 14:20:27 +00:00
|
|
|
\ ale#path#CdString(expand('%:p:h'))
|
2018-02-04 13:55:09 +00:00
|
|
|
\ . 'go test --foo-bar -c -o /dev/null ./'
|
2018-09-19 18:33:23 +00:00
|
|
|
|
|
|
|
let g:ale_go_gobuild_options = ''
|
|
|
|
|
|
|
|
Execute(The executable should be configurable):
|
|
|
|
let g:ale_go_go_executable = 'foobar'
|
|
|
|
|
|
|
|
AssertLinter 'foobar',
|
2018-10-23 14:20:27 +00:00
|
|
|
\ ale#path#CdString(expand('%:p:h'))
|
2018-09-19 18:33:23 +00:00
|
|
|
\ . 'foobar test -c -o /dev/null ./'
|