2019-05-13 18:50:03 +00:00
|
|
|
Before:
|
|
|
|
call ale#assert#SetUpLinterTest('tex', 'texlab')
|
|
|
|
|
|
|
|
Save &filetype
|
|
|
|
let &filetype = 'tex'
|
|
|
|
|
|
|
|
After:
|
|
|
|
call ale#assert#TearDownLinterTest()
|
|
|
|
|
|
|
|
Execute(The language string should be correct):
|
|
|
|
AssertLSPLanguage 'tex'
|
|
|
|
|
|
|
|
Execute(The default executable path should be correct):
|
|
|
|
AssertLinter 'texlab', ale#Escape('texlab')
|
|
|
|
|
|
|
|
Execute(The project root should be detected correctly):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('../test-files/tex/sample1.tex')
|
|
|
|
silent! call mkdir('../test-files/tex/.git')
|
2021-03-12 11:40:40 +00:00
|
|
|
|
2021-03-20 22:11:22 +00:00
|
|
|
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/tex')
|
2019-05-13 18:50:03 +00:00
|
|
|
|
|
|
|
Execute(The executable should be configurable):
|
|
|
|
let b:ale_tex_texlab_executable = 'foobar'
|
|
|
|
|
|
|
|
AssertLinter 'foobar', ale#Escape('foobar')
|
|
|
|
|
|
|
|
Execute(The options should be configurable):
|
|
|
|
let b:ale_tex_texlab_options = '-v'
|
|
|
|
|
|
|
|
AssertLinter 'texlab', ale#Escape('texlab') . ' ' . b:ale_tex_texlab_options
|