mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 16:08:36 +00:00
feat(eval/method): partially port v8.1.1987
Cannot be fully ported as the remote_*() functions from +clientserver are not yet ported. Include the test changes anyway. line()'s optional winid argument was already ported. (Wasn't added in this patch; this just adds documentation)
This commit is contained in:
@@ -295,7 +295,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')
|
||||
|
||||
@@ -1306,7 +1306,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:')
|
||||
|
||||
@@ -1578,7 +1578,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
|
||||
|
Reference in New Issue
Block a user