diff src/testdir/test_functions.vim @ 17982:2029737e6a22 v8.1.1987

patch 8.1.1987: more functions can be used as methods Commit: https://github.com/vim/vim/commit/a0d1fef4ebb693696464c5e22e33269f724b8e0e Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 4 22:29:14 2019 +0200 patch 8.1.1987: 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 Wed, 04 Sep 2019 22:30:03 +0200
parents 6d11a0d5751d
children 0dcc2ee838dd
line wrap: on
line diff
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -253,7 +253,7 @@ func Test_resolve_unix()
   call delete('Xlink')
 
   silent !ln -s -f Xlink2/ Xlink1
-  call assert_equal('Xlink2', resolve('Xlink1'))
+  call assert_equal('Xlink2', 'Xlink1'->resolve())
   call assert_equal('Xlink2/', resolve('Xlink1/'))
   call delete('Xlink1')
 
@@ -1413,7 +1413,7 @@ func Test_func_range_with_edit()
   " is invalid in that buffer.
   call writefile(['just one line'], 'Xfuncrange2')
   new
-  call setline(1, range(10))
+  call setline(1, 10->range())
   write Xfuncrange1
   call assert_fails('5,8call EditAnotherFile()', 'E16:')
 
@@ -1544,7 +1544,7 @@ func Test_readdir()
   call assert_equal(['bar.txt', 'dir', 'foo.txt'], sort(files))
 
   " Only results containing "f"
-  let files = readdir('Xdir', { x -> stridx(x, 'f') !=- 1 })
+  let files = 'Xdir'->readdir({ x -> stridx(x, 'f') !=- 1 })
   call assert_equal(['foo.txt'], sort(files))
 
   " Only .txt files