2019-10-17 16:32:31 +00:00
|
|
|
Before:
|
|
|
|
runtime ale_linters/nim/nimlsp.vim
|
|
|
|
call ale#test#SetDirectory('/testplugin/test')
|
|
|
|
|
|
|
|
After:
|
|
|
|
if isdirectory(g:dir . '/.git')
|
|
|
|
call delete(g:dir . '/.git', 'd')
|
|
|
|
endif
|
|
|
|
|
|
|
|
call ale#test#RestoreDirectory()
|
|
|
|
call ale#linter#Reset()
|
|
|
|
|
|
|
|
|
|
|
|
Execute(Detect root of nim project with .git/ correctly):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('test-files/nim/with-git/src/source.nim')
|
2019-10-17 16:32:31 +00:00
|
|
|
call mkdir(g:dir . '/.git')
|
|
|
|
AssertEqual
|
|
|
|
\ ale#path#Simplify(g:dir),
|
|
|
|
\ ale_linters#nim#nimlsp#GetProjectRoot(bufnr(''))
|