diff src/testdir/test_swap.vim @ 18017:988e5a868b60 v8.1.2004

patch 8.1.2004: more functions can be used as methods Commit: https://github.com/vim/vim/commit/f6ed61e1489e40eada55a4f1782e1ed82bcad7d9 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 7 19:05:09 2019 +0200 patch 8.1.2004: more functions can be used as methods Problem: More functions can be used as methods. Solution: Make various functions usable as a method.
author Bram Moolenaar <Bram@vim.org>
date Sat, 07 Sep 2019 19:15:04 +0200
parents b52ea9c5f1db
children f6dcf7eabd26
line wrap: on
line diff
--- a/src/testdir/test_swap.vim
+++ b/src/testdir/test_swap.vim
@@ -111,7 +111,7 @@ func Test_swapinfo()
   w
   let fname = s:swapname()
   call assert_match('Xswapinfo', fname)
-  let info = swapinfo(fname)
+  let info = fname->swapinfo()
 
   let ver = printf('VIM %d.%d', v:version / 100, v:version % 100)
   call assert_equal(ver, info.version)
@@ -153,7 +153,7 @@ func Test_swapname()
   let buf = bufnr('%')
   let expected = s:swapname()
   wincmd p
-  call assert_equal(expected, swapname(buf))
+  call assert_equal(expected, buf->swapname())
 
   new Xtest3
   setlocal noswapfile