mirror of
https://github.com/dense-analysis/ale
synced 2024-12-25 07:32:24 +00:00
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
Before:
|
|
call ale#assert#SetUpLinterTest('go', 'bingo')
|
|
|
|
After:
|
|
Restore
|
|
|
|
if isdirectory(g:dir . '/.git')
|
|
call delete(g:dir . '/.git', 'd')
|
|
endif
|
|
|
|
unlet! b:ale_completion_enabled
|
|
|
|
call ale#assert#TearDownLinterTest()
|
|
|
|
Execute(should set correct defaults):
|
|
AssertLinter 'bingo', ale#Escape('bingo') . ' --mode stdio'
|
|
|
|
Execute(should configure bingo callback executable):
|
|
let b:ale_go_bingo_executable = 'boo'
|
|
let b:ale_go_bingo_options = ''
|
|
|
|
AssertLinter 'boo', ale#Escape('boo')
|
|
|
|
Execute(should set bingo options):
|
|
call ale#test#SetFilename('go_paths/go1/prj1/file.go')
|
|
" let b:ale_completion_enabled = 1
|
|
let b:ale_go_bingo_options = ''
|
|
|
|
AssertLinter 'bingo',
|
|
\ ale#Escape('bingo') . ''
|
|
|
|
let b:ale_go_bingo_options = '--mode stdio --trace'
|
|
|
|
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
|