mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-25 19:17:23 +08:00
Fix #2668 - Set g:ale_go_go111module
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
Before:
|
||||
Save g:ale_go_gofmt_executable
|
||||
Save g:ale_go_gofmt_options
|
||||
Save g:ale_go_go111module
|
||||
|
||||
" Use an invalid global executable, so we don't match it.
|
||||
let g:ale_go_gofmt_executable = 'xxxinvalid'
|
||||
let g:ale_go_gofmt_options = ''
|
||||
let g:ale_go_go111module = ''
|
||||
|
||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
||||
|
||||
After:
|
||||
Restore
|
||||
|
||||
unlet! b:ale_go_go111module
|
||||
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The gofmt callback should return the correct default values):
|
||||
@@ -28,6 +30,7 @@ Execute(The gofmt callback should return the correct default values):
|
||||
|
||||
Execute(The gofmt callback should include custom gofmt options):
|
||||
let g:ale_go_gofmt_options = "-r '(a) -> a'"
|
||||
|
||||
call ale#test#SetFilename('../go_files/testfile.go')
|
||||
|
||||
AssertEqual
|
||||
@@ -42,6 +45,7 @@ Execute(The gofmt callback should include custom gofmt options):
|
||||
|
||||
Execute(The gofmt callback should support Go environment variables):
|
||||
let g:ale_go_go111module = 'off'
|
||||
|
||||
call ale#test#SetFilename('../go_files/testfile.go')
|
||||
|
||||
AssertEqual
|
||||
|
||||
Reference in New Issue
Block a user