1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
Before:
call ale#assert#SetUpLinterTest('tex', 'chktex')
GivenCommandOutput ['ChkTeX v1.7.6 - Copyright 1995-96 Jens T. Berger Thielemann']
After:
call ale#assert#TearDownLinterTest()
Execute(The default command should be correct):
AssertLinter 'chktex', [
\ ale#Escape('chktex') . ' --version',
\ ale#Escape('chktex')
\ . ' -v0 -p stdin -q'
\ . ' -I',
\]
" The version check should be cached.
GivenCommandOutput []
AssertLinter 'chktex', [
\ ale#Escape('chktex')
\ . ' -v0 -p stdin -q'
\ . ' -I',
\]
" Try newer version
call ale#semver#ResetVersionCache()
GivenCommandOutput ['ChkTeX v1.7.8 - Copyright 1995-96 Jens T. Berger Thielemann']
AssertLinter 'chktex', [
\ ale#Escape('chktex') . ' --version',
\ ale#Escape('chktex')
\ . ' -v0 -p stdin -q'
\ . ' -S TabSize=1'
\ . ' -I',
\]
Execute(The executable should be configurable):
let g:ale_tex_chktex_executable = 'bin/foo'
AssertLinter 'bin/foo',
\ ale#Escape('bin/foo')
\ . ' -v0 -p stdin -q'
\ . ' -I'
Execute(The options should be configurable):
let b:ale_tex_chktex_options = '--something'
AssertLinter 'chktex',
\ ale#Escape('chktex')
\ . ' -v0 -p stdin -q'
\ . ' --something'
|