summaryrefslogtreecommitdiff
path: root/test/fixers/test_gofmt_fixer_callback.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/fixers/test_gofmt_fixer_callback.vader')
-rw-r--r--test/fixers/test_gofmt_fixer_callback.vader14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/fixers/test_gofmt_fixer_callback.vader b/test/fixers/test_gofmt_fixer_callback.vader
index 14e6e063..b8376142 100644
--- a/test/fixers/test_gofmt_fixer_callback.vader
+++ b/test/fixers/test_gofmt_fixer_callback.vader
@@ -5,6 +5,7 @@ Before:
" 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')
@@ -38,3 +39,16 @@ Execute(The gofmt callback should include custom gofmt options):
\ . ' %t',
\ },
\ ale#fixers#gofmt#Fix(bufnr(''))
+
+Execute(The gofmt callback should support Go environment variables):
+ let g:ale_go_go111module = 'off'
+ call ale#test#SetFilename('../go_files/testfile.go')
+
+ AssertEqual
+ \ {
+ \ 'read_temporary_file': 1,
+ \ 'command': ale#Env('GO111MODULE', 'off')
+ \ . ale#Escape('xxxinvalid') . ' -l -w'
+ \ . ' %t',
+ \ },
+ \ ale#fixers#gofmt#Fix(bufnr(''))