comparison src/testdir/test_bufline.vim @ 17994:0dcc2ee838dd v8.1.1993

patch 8.1.1993: more functions can be used as methods Commit: https://github.com/vim/vim/commit/196b4664432f932625cfb6371dc42c24efe6c203 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 6 21:34:30 2019 +0200 patch 8.1.1993: 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 Fri, 06 Sep 2019 21:45:04 +0200
parents 4935244c1128
children c087099e9163
comparison
equal deleted inserted replaced
17993:55bdc69c5e57 17994:0dcc2ee838dd
18 split Xtest 18 split Xtest
19 call setline(1, ['a', 'b', 'c']) 19 call setline(1, ['a', 'b', 'c'])
20 let b = bufnr('%') 20 let b = bufnr('%')
21 wincmd w 21 wincmd w
22 call assert_equal(1, setbufline(b, 5, ['x'])) 22 call assert_equal(1, setbufline(b, 5, ['x']))
23 call assert_equal(1, setbufline(bufnr('$') + 1, 1, ['x'])) 23 call assert_equal(1, ['x']->setbufline(bufnr('$') + 1, 1))
24 call assert_equal(0, setbufline(b, 4, ['d', 'e'])) 24 call assert_equal(0, setbufline(b, 4, ['d', 'e']))
25 call assert_equal(['c'], b->getbufline(3)) 25 call assert_equal(['c'], b->getbufline(3))
26 call assert_equal(['d'], getbufline(b, 4)) 26 call assert_equal(['d'], getbufline(b, 4))
27 call assert_equal(['e'], getbufline(b, 5)) 27 call assert_equal(['e'], getbufline(b, 5))
28 call assert_equal([], getbufline(b, 6)) 28 call assert_equal([], getbufline(b, 6))