Add command callback test

This commit is contained in:
jD91mZM2 2021-02-02 13:01:03 +01:00
parent 4894c760c2
commit 98caa19cc7
No known key found for this signature in database
GPG key ID: E471B167937421AB
3 changed files with 12 additions and 1 deletions

View file

@ -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

View 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')

View file

@ -1,6 +1,9 @@
Before:
runtime ale_linters/json/jq.vim
After:
call ale#linter#Reset()
Execute (Should parse error correctly):
AssertEqual
\ [