Add neovim 0.6 to run-tests (#3998)

* Update test scripts
* Remove neovim 0.3 and 0.4
* Add neovim 0.6.1

Co-authored-by: Horacio Sanson <horacio@allm.inc>
Co-authored-by: w0rp <devw0rp@gmail.com>
This commit is contained in:
Horacio Sanson
2022-04-01 21:17:15 +09:00
committed by GitHub
parent e81f005c78
commit 0f55d371e9
48 changed files with 194 additions and 201 deletions

View File

@@ -34,16 +34,24 @@ Before:
Save &fileformats
set fileformats=unix
let g:file = tempname()
function! TestChanges(contents, changes) abort
call writefile(split(a:contents, '\n', 1), g:file, 'bS')
let l:file = tempname()
call ale#code_action#ApplyChanges(g:file, a:changes, {
\ 'should_save': 1,
\})
try
call writefile(split(a:contents, '\n', 1), l:file, 'bs')
return join(readfile(g:file, 'b'), "\n")
call ale#code_action#ApplyChanges(l:file, a:changes, {
\ 'should_save': 1,
\})
let l:result = join(readfile(l:file, 'b'), "\n")
finally
if filereadable(l:file)
call delete(l:file)
endif
endtry
return l:result
endfunction!
function! MkPos(line, offset) abort
@@ -59,16 +67,6 @@ Before:
endfunction!
After:
if bufnr(g:file) != -1
execute ':bp! | :bd! ' . bufnr(g:file)
endif
if filereadable(g:file)
call delete(g:file)
endif
unlet! g:file
delfunction TestChanges
delfunction MkPos
delfunction MkInsert