mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.0316: swapinfo() test fails on Travis
Problem: swapinfo() test fails on Travis.
Solution: Handle a long host name. (Ozaki Kiichi, closes vim/vim#3361)
Also make the version check flexible. (James McCoy)
4c5765bc47
This commit is contained in:
parent
39e3783c69
commit
3a92040b44
@ -69,9 +69,13 @@ func Test_swapinfo()
|
||||
let fname = trim(execute('swapname'))
|
||||
call assert_match('Xswapinfo', fname)
|
||||
let info = swapinfo(fname)
|
||||
call assert_match('8\.', info.version)
|
||||
|
||||
let ver = printf('VIM %d.%d', v:version / 100, v:version % 100)
|
||||
call assert_equal(ver, info.version)
|
||||
|
||||
call assert_match('\w', info.user)
|
||||
call assert_equal(hostname(), info.host)
|
||||
" host name is truncated to 39 bytes in the swap file
|
||||
call assert_equal(hostname()[:38], info.host)
|
||||
call assert_match('Xswapinfo', info.fname)
|
||||
call assert_match(0, info.dirty)
|
||||
call assert_equal(getpid(), info.pid)
|
||||
|
Loading…
Reference in New Issue
Block a user