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.
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index fc22bcd..dfd6a93 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -253,7 +253,7 @@
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 @@
" 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 @@
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