diff options
author | w0rp <devw0rp@gmail.com> | 2023-09-07 19:59:05 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2023-09-07 20:01:31 +0100 |
commit | 108e858d61bcd5962ca404f12d8b56e5986739c1 (patch) | |
tree | 266b52b16b9c9ba239f0080a609c9d7e6ba1f675 /test | |
parent | 14350dbb0d265ef87d1c7d420d89fb4165a2b131 (diff) | |
download | ale-108e858d61bcd5962ca404f12d8b56e5986739c1.zip |
Update minimum supported NeoVim version to 0.6.0
Stop officially supporting NeoVim versions below 0.6.0, without
necessarily breaking ALE for people using older versions.
Diffstat (limited to 'test')
-rw-r--r-- | test/completion/test_omnifunc_completion.vader | 2 | ||||
-rw-r--r-- | test/test_neovim_diagnostics.vader | 100 |
2 files changed, 48 insertions, 54 deletions
diff --git a/test/completion/test_omnifunc_completion.vader b/test/completion/test_omnifunc_completion.vader index 1db64705..c9ecd205 100644 --- a/test/completion/test_omnifunc_completion.vader +++ b/test/completion/test_omnifunc_completion.vader @@ -45,7 +45,7 @@ Execute(The start position should be returned when results can be requested): AssertEqual 11, ale#completion#OmniFunc(1, '') Execute(The omnifunc function should return async results): - " Neovim 0.2.0 and 0.4.4 struggles at running these tests. + " Neovim struggles at running these tests. if !has('nvim') call timer_start(0, function('SetCompletionResult')) diff --git a/test/test_neovim_diagnostics.vader b/test/test_neovim_diagnostics.vader index 41997097..4cef8d35 100644 --- a/test/test_neovim_diagnostics.vader +++ b/test/test_neovim_diagnostics.vader @@ -2,10 +2,6 @@ Before: Save g:ale_use_neovim_diagnostics_api function! CollectMessages(buffer) - if !has('nvim-0.6') - return - endif - let l:messages = [] for l:diag in v:lua.vim.diagnostic.get(a:buffer) call add(l:messages, l:diag.message) @@ -22,56 +18,54 @@ After: Execute(Should only set diagnostics belonging to the given buffer): if has('nvim-0.6') + let b:other_bufnr = bufnr('/foo/bar/baz', 1) + " Make sure we actually get another buffer number, or the test is invalid. + AssertNotEqual -1, b:other_bufnr - let b:other_bufnr = bufnr('/foo/bar/baz', 1) - " Make sure we actually get another buffer number, or the test is invalid. - AssertNotEqual -1, b:other_bufnr - - let g:ale_use_neovim_diagnostics_api = 1 - - call ale#engine#SetResults(bufnr('%'), [ - \ { - \ 'lnum': 1, - \ 'col': 10, - \ 'bufnr': bufnr('%'), - \ 'vcol': 0, - \ 'linter_name': 'bettercode', - \ 'nr': -1, - \ 'type': 'W', - \ 'text': 'A', - \ }, - \ { - \ 'lnum': 2, - \ 'col': 10, - \ 'bufnr': b:other_bufnr, - \ 'vcol': 0, - \ 'linter_name': 'bettercode', - \ 'nr': -1, - \ 'type': 'W', - \ 'text': 'B', - \ }, - \ { - \ 'lnum': 3, - \ 'col': 1, - \ 'bufnr': bufnr('%'), - \ 'vcol': 0, - \ 'linter_name': 'bettercode', - \ 'nr': -1, - \ 'type': 'E', - \ 'text': 'C', - \ }, - \ { - \ 'lnum': 4, - \ 'col': 1, - \ 'bufnr': b:other_bufnr, - \ 'vcol': 0, - \ 'linter_name': 'bettercode', - \ 'nr': -1, - \ 'type': 'E', - \ 'text': 'D', - \ }, - \]) + let g:ale_use_neovim_diagnostics_api = 1 - AssertEqual ["A", "C"], CollectMessages(bufnr('%')) + call ale#engine#SetResults(bufnr('%'), [ + \ { + \ 'lnum': 1, + \ 'col': 10, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'linter_name': 'bettercode', + \ 'nr': -1, + \ 'type': 'W', + \ 'text': 'A', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 10, + \ 'bufnr': b:other_bufnr, + \ 'vcol': 0, + \ 'linter_name': 'bettercode', + \ 'nr': -1, + \ 'type': 'W', + \ 'text': 'B', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 1, + \ 'bufnr': bufnr('%'), + \ 'vcol': 0, + \ 'linter_name': 'bettercode', + \ 'nr': -1, + \ 'type': 'E', + \ 'text': 'C', + \ }, + \ { + \ 'lnum': 4, + \ 'col': 1, + \ 'bufnr': b:other_bufnr, + \ 'vcol': 0, + \ 'linter_name': 'bettercode', + \ 'nr': -1, + \ 'type': 'E', + \ 'text': 'D', + \ }, + \]) + AssertEqual ["A", "C"], CollectMessages(bufnr('%')) endif |