Get tests to pass in Vim 8.1

This commit is contained in:
w0rp
2018-07-23 20:41:06 +01:00
parent 11339ca730
commit d9579dbbe9
20 changed files with 150 additions and 104 deletions

View File

@@ -59,14 +59,14 @@ Execute(No linting should be done on :wq or :x):
" First try just the SaveEvent, to be sure that we set errors in the test.
call ale#events#SaveEvent(bufnr(''))
AssertEqual 1, len(getloclist(0))
AssertEqual 1, len(ale#test#GetLoclistWithoutModule())
" Now try doing it again, but where we run the quit event first.
call setloclist(0, [])
call ale#events#QuitEvent(bufnr(''))
call ale#events#SaveEvent(bufnr(''))
AssertEqual [], getloclist(0)
AssertEqual [], ale#test#GetLoclistWithoutModule()
Execute(No linting should be for :w after :q fails):
let g:ale_lint_on_save = 1
@@ -79,7 +79,7 @@ Execute(No linting should be for :w after :q fails):
call ale#events#SaveEvent(bufnr(''))
AssertEqual 1, len(getloclist(0))
AssertEqual 1, len(ale#test#GetLoclistWithoutModule())
Execute(No linting should be done on :wq or :x after fixing files):
let g:ale_lint_on_save = 0
@@ -87,14 +87,14 @@ Execute(No linting should be done on :wq or :x after fixing files):
call ale#events#SaveEvent(bufnr(''))
AssertEqual 1, len(getloclist(0))
AssertEqual 1, len(ale#test#GetLoclistWithoutModule())
" Now try doing it again, but where we run the quit event first.
call setloclist(0, [])
call ale#events#QuitEvent(bufnr(''))
call ale#events#SaveEvent(bufnr(''))
AssertEqual [], getloclist(0)
AssertEqual [], ale#test#GetLoclistWithoutModule()
Execute(Linting should be done after :q fails and fixing files):
let g:ale_lint_on_save = 0
@@ -107,4 +107,4 @@ Execute(Linting should be done after :q fails and fixing files):
call ale#events#SaveEvent(bufnr(''))
AssertEqual 1, len(getloclist(0))
AssertEqual 1, len(ale#test#GetLoclistWithoutModule())