aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-04-29 21:09:14 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-04-29 21:19:45 +0200
commit3a92040b443edfbf0f7c9423c865e5a013b07d62 (patch)
tree6953d7cee35223ab0c97143fda58de90242da8a4
parent39e3783c697bad7ed16f5ce53910bb55f412626f (diff)
downloadrneovim-3a92040b443edfbf0f7c9423c865e5a013b07d62.tar.gz
rneovim-3a92040b443edfbf0f7c9423c865e5a013b07d62.tar.bz2
rneovim-3a92040b443edfbf0f7c9423c865e5a013b07d62.zip
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) https://github.com/vim/vim/commit/4c5765bc47b2708075e8d8471e8d342079479777
-rw-r--r--src/nvim/testdir/test_swap.vim8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_swap.vim b/src/nvim/testdir/test_swap.vim
index 241754aae0..789f14aa8d 100644
--- a/src/nvim/testdir/test_swap.vim
+++ b/src/nvim/testdir/test_swap.vim
@@ -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)