-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check chktex version instead of trying -S option
- Loading branch information
Showing
2 changed files
with
41 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,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', | ||
AssertLinter 'chktex', [ | ||
\ ale#Escape('chktex') . ' --version', | ||
\ ale#Escape('chktex') | ||
\ . ' -v0 -p stdin -q -S TabSize=1' | ||
\ . ' -I' | ||
\ . ' -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 -S TabSize=1' | ||
\ . ' -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 -S TabSize=1' | ||
\ . ' -v0 -p stdin -q' | ||
\ . ' --something' |