summaryrefslogtreecommitdiff
path: root/test/fixers
diff options
context:
space:
mode:
authorJeff Willette <jrwillette88@gmail.com>2017-11-15 02:37:22 +0900
committerw0rp <w0rp@users.noreply.github.com>2017-11-14 17:37:22 +0000
commit20a01404f346f6c633f15b6c5ca45279259f2c5d (patch)
tree9f71684198931b191a838f71223811fa5cbc706d /test/fixers
parent16e7dc2371f908204e5191c0e9d55626352097af (diff)
downloadale-20a01404f346f6c633f15b6c5ca45279259f2c5d.zip
Added support for goimports fixer (#1123)
* Added support for goimports fixer * added test and executable check * fixed test assertions to reflect executable check
Diffstat (limited to 'test/fixers')
-rw-r--r--test/fixers/test_goimports_fixer_callback.vader22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/fixers/test_goimports_fixer_callback.vader b/test/fixers/test_goimports_fixer_callback.vader
new file mode 100644
index 00000000..df57114e
--- /dev/null
+++ b/test/fixers/test_goimports_fixer_callback.vader
@@ -0,0 +1,22 @@
+Before:
+ Save g:ale_go_goimports_executable
+ Save g:ale_go_goimports_options
+
+ " Use an invalid global executable, so we don't match it.
+ let g:ale_go_goimports_executable = 'xxxinvalid'
+ let g:ale_go_goimports_options = ''
+
+ call ale#test#SetDirectory('/testplugin/test/fixers')
+
+After:
+ Restore
+
+ call ale#test#RestoreDirectory()
+
+Execute(The goimports callback should return 0 with bad executable):
+ call ale#test#SetFilename('../go_files/testfile.go')
+
+ AssertEqual
+ \ 0,
+ \ ale#fixers#goimports#Fix(bufnr(''))
+