diff src/testdir/test_functions.vim @ 17783:45eca7143d7c v8.1.1888

patch 8.1.1888: more functions can be used as methods commit https://github.com/vim/vim/commit/073e4b92e613d22ce7b16e0fbf5c0e40cb5f9b2c Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 18 23:01:56 2019 +0200 patch 8.1.1888: 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 Sun, 18 Aug 2019 23:15:03 +0200
parents 0da9bc55c31a
children 1090d6637cfd
line wrap: on
line diff
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -1537,12 +1537,12 @@ func Test_bufadd_bufload()
 
   let curbuf = bufnr('')
   call writefile(['some', 'text'], 'XotherName')
-  let buf = bufadd('XotherName')
+  let buf = 'XotherName'->bufadd()
   call assert_notequal(0, buf)
-  call assert_equal(1, bufexists('XotherName'))
+  eval 'XotherName'->bufexists()->assert_equal(1)
   call assert_equal(0, getbufvar(buf, '&buflisted'))
   call assert_equal(0, bufloaded(buf))
-  call bufload(buf)
+  eval buf->bufload()
   call assert_equal(1, bufloaded(buf))
   call assert_equal(['some', 'text'], getbufline(buf, 1, '$'))
   call assert_equal(curbuf, bufnr(''))