mirror of https://github.com/dense-analysis/ale
Clean up bingo tests, so they pass on my machine too
This commit is contained in:
parent
6644563949
commit
cbaa7eb3c7
|
@ -4,6 +4,10 @@ Before:
|
|||
After:
|
||||
Restore
|
||||
|
||||
if isdirectory(g:dir . '/.git')
|
||||
call delete(g:dir . '/.git', 'd')
|
||||
endif
|
||||
|
||||
unlet! b:ale_completion_enabled
|
||||
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
@ -29,3 +33,14 @@ Execute(should set bingo options):
|
|||
|
||||
AssertLinter 'bingo',
|
||||
\ ale#Escape('bingo') . ' --mode stdio --trace'
|
||||
|
||||
Execute(Should return directory for 'go.mod' if found in parent directory):
|
||||
call ale#test#SetFilename('../go_files/test.go')
|
||||
|
||||
AssertLSPProject ale#path#Simplify(g:dir . '/../go_files')
|
||||
|
||||
Execute(Should return nearest directory with '.git' if found in parent directory):
|
||||
call ale#test#SetFilename('test.go')
|
||||
call mkdir(g:dir . '/.git')
|
||||
|
||||
AssertLSPProject g:dir
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
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(''))
|
Loading…
Reference in New Issue