2024-01-14 12:04:23 +00:00
|
|
|
Before:
|
|
|
|
call ale#assert#SetUpLinterTest('tex', 'chktex')
|
|
|
|
|
2024-02-26 23:54:14 +00:00
|
|
|
GivenCommandOutput ['ChkTeX v1.7.6 - Copyright 1995-96 Jens T. Berger Thielemann']
|
|
|
|
|
2024-01-14 12:04:23 +00:00
|
|
|
After:
|
|
|
|
call ale#assert#TearDownLinterTest()
|
|
|
|
|
|
|
|
Execute(The default command should be correct):
|
2024-02-26 23:54:14 +00:00
|
|
|
AssertLinter 'chktex', [
|
|
|
|
\ ale#Escape('chktex') . ' --version',
|
2024-01-14 12:04:23 +00:00
|
|
|
\ ale#Escape('chktex')
|
2024-02-26 02:56:56 +00:00
|
|
|
\ . ' -v0 -p stdin -q'
|
2024-02-26 23:54:14 +00:00
|
|
|
\ . ' -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',
|
|
|
|
\]
|
2024-01-14 12:04:23 +00:00
|
|
|
|
|
|
|
Execute(The executable should be configurable):
|
|
|
|
let g:ale_tex_chktex_executable = 'bin/foo'
|
|
|
|
|
|
|
|
AssertLinter 'bin/foo',
|
|
|
|
\ ale#Escape('bin/foo')
|
2024-02-26 02:56:56 +00:00
|
|
|
\ . ' -v0 -p stdin -q'
|
2024-01-14 12:04:23 +00:00
|
|
|
\ . ' -I'
|
|
|
|
|
|
|
|
Execute(The options should be configurable):
|
|
|
|
let b:ale_tex_chktex_options = '--something'
|
|
|
|
|
|
|
|
AssertLinter 'chktex',
|
|
|
|
\ ale#Escape('chktex')
|
2024-02-26 02:56:56 +00:00
|
|
|
\ . ' -v0 -p stdin -q'
|
2024-01-14 12:04:23 +00:00
|
|
|
\ . ' --something'
|