summaryrefslogtreecommitdiff
path: root/test/linter/test_gosimple.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/linter/test_gosimple.vader')
-rw-r--r--test/linter/test_gosimple.vader19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/linter/test_gosimple.vader b/test/linter/test_gosimple.vader
new file mode 100644
index 00000000..960f8ee9
--- /dev/null
+++ b/test/linter/test_gosimple.vader
@@ -0,0 +1,19 @@
+Before:
+ Save g:ale_go_go111module
+
+ call ale#assert#SetUpLinterTest('go', 'gosimple')
+ call ale#test#SetFilename('../test-files/go/testfile2.go')
+
+After:
+ unlet! b:ale_go_go111module
+
+ call ale#assert#TearDownLinterTest()
+
+Execute(The default gosimple command should be correct):
+ AssertLinterCwd '%s:h'
+ AssertLinter 'gosimple', 'gosimple .'
+
+Execute(The gosimple command should support Go environment variables):
+ let b:ale_go_go111module = 'on'
+
+ AssertLinter 'gosimple', ale#Env('GO111MODULE', 'on') . 'gosimple .'