diff options
author | Jorengarenar <jorengarenar@outlook.com> | 2024-02-27 00:54:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-27 08:54:14 +0900 |
commit | 9b8413a825b6d454ebb5be2285e3fa01a2ea63c1 (patch) | |
tree | 6f17012bc916cc17312441025ec84f00545afa1d /test/linter | |
parent | 00dcf52d6f315721e3cddf19c815b353dcde9220 (diff) | |
download | ale-9b8413a825b6d454ebb5be2285e3fa01a2ea63c1.zip |
Fix chktex highlighting wrong column when using tabs instead of spaces (#4727)
* Fix '-s' to be '-S' when setting 'TabSize=1' for chktex
Fixes #4712
Closes #4725
* Check if chktex's -S option is available
* Check chktex version instead of trying -S option
Diffstat (limited to 'test/linter')
-rw-r--r-- | test/linter/test_tex_chktex.vader | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/test/linter/test_tex_chktex.vader b/test/linter/test_tex_chktex.vader index d787ca87..038bd10c 100644 --- a/test/linter/test_tex_chktex.vader +++ b/test/linter/test_tex_chktex.vader @@ -1,14 +1,37 @@ 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', + AssertLinter 'chktex', [ + \ ale#Escape('chktex') . ' --version', \ ale#Escape('chktex') \ . ' -v0 -p stdin -q' - \ . ' -I' + \ . ' -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' |