ale/test/fixers/test_goimports_fixer_callback.vader
Jeff Willette 20a01404f3 Added support for goimports fixer (#1123)
* Added support for goimports fixer
* added test and executable check
* fixed test assertions to reflect executable check
2017-11-14 17:37:22 +00:00

23 lines
528 B
Plaintext

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(''))