# HG changeset patch # User Christian Brabandt # Date 1534930205 -7200 # Node ID 0c47880f3d95ad34e6146aa72aacde964415e7a1 # Parent b16163358e63ee87ae44fcf46535fe9f4fa2f373 patch 8.1.0316: swapinfo() test fails on Travis commit https://github.com/vim/vim/commit/4c5765bc47b2708075e8d8471e8d342079479777 Author: Bram Moolenaar Date: Wed Aug 22 11:28:01 2018 +0200 patch 8.1.0316: swapinfo() test fails on Travis Problem: swapinfo() test fails on Travis. Solution: Handle a long host name. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/3361) Also make the version check flexible. (James McCoy) diff --git a/src/testdir/test_swap.vim b/src/testdir/test_swap.vim --- a/src/testdir/test_swap.vim +++ b/src/testdir/test_swap.vim @@ -105,9 +105,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) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -795,6 +795,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 316, +/**/ 315, /**/ 314,