ale/test/test_bingo_find_project_root.vader
Jerko Steiner 5bbe77101d Add support for bingo (#2165)
* Add support for https://github.com/saibing/bingo
* Add docs for ale-go-bingo
* Use go.mod when found
* Add test for bingo FindProjectRoot
* Simplify ale_linters#go#bingo#GetCommand
2019-01-05 19:12:55 +00:00

22 lines
646 B
Plaintext

Before:
call ale#test#SetDirectory('/testplugin/test')
runtime ale_linters/go/bingo.vim
After:
call ale#test#RestoreDirectory()
call ale#linter#Reset()
Execute(Should return directory for 'go.mod' if found in parent directory):
call ale#test#SetFilename('go_files/test.go')
AssertEqual
\ ale#path#Simplify(g:dir . '/go_files'),
\ ale_linters#go#bingo#FindProjectRoot(bufnr(''))
Execute(Should return nearest directory with '.git' if found in parent directory):
call ale#test#SetFilename('test.go')
AssertEqual
\ fnamemodify(ale#path#Simplify('/testplugin'), ':p:h'),
\ ale_linters#go#bingo#FindProjectRoot(bufnr(''))