mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-06 01:47:47 +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
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
Before:
|
||||
Save g:ale_go_goimports_executable
|
||||
Save g:ale_go_goimports_options
|
||||
Save g:ale_go_go111module
|
||||
|
||||
" Use an invalid global executable, so we don't match it.
|
||||
let g:ale_go_goimports_executable = 'xxxinvalid'
|
||||
let g:ale_go_goimports_options = ''
|
||||
let g:ale_go_go111module = ''
|
||||
|
||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
||||
call ale#test#SetFilename('../go_files/testfile.go')
|
||||
@@ -13,6 +13,8 @@ Before:
|
||||
After:
|
||||
Restore
|
||||
|
||||
unlet! b:ale_go_go111module
|
||||
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The goimports callback should return 0 when the executable isn't executable):
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Before:
|
||||
Save g:ale_go_go_executable
|
||||
Save g:ale_go_go111module
|
||||
|
||||
" Use an invalid global executable, so we don't match it.
|
||||
let g:ale_go_go_executable = 'xxxinvalid'
|
||||
@@ -9,6 +10,8 @@ Before:
|
||||
After:
|
||||
Restore
|
||||
|
||||
unlet! b:ale_go_go111module
|
||||
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The gomod callback should return the correct default values):
|
||||
|
||||
Reference in New Issue
Block a user