Add command callback test
This commit is contained in:
parent
4894c760c2
commit
98caa19cc7
3 changed files with 12 additions and 1 deletions
|
@ -5,7 +5,7 @@ call ale#Set('json_jq_executable', 'jq')
|
|||
function! ale_linters#json#jq#GetCommand(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'json_jq_executable')
|
||||
|
||||
return ale#Var(a:buffer, 'json_jq_executable')
|
||||
return ale#Escape(l:executable)
|
||||
endfunction
|
||||
|
||||
function! ale_linters#json#jq#Handle(buffer, lines) abort
|
||||
|
|
8
test/command_callback/test_jq_command_callback.vader
Normal file
8
test/command_callback/test_jq_command_callback.vader
Normal file
|
@ -0,0 +1,8 @@
|
|||
Before:
|
||||
call ale#assert#SetUpLinterTest('json', 'jq')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The default command should be correct):
|
||||
AssertLinter 'jq', ale#Escape('jq')
|
|
@ -1,6 +1,9 @@
|
|||
Before:
|
||||
runtime ale_linters/json/jq.vim
|
||||
|
||||
After:
|
||||
call ale#linter#Reset()
|
||||
|
||||
Execute (Should parse error correctly):
|
||||
AssertEqual
|
||||
\ [
|
||||
|
|
Reference in a new issue