Mercurial > vim
diff src/testdir/test_bufline.vim @ 16668:81be817c9d9a v8.1.1336
patch 8.1.1336: some eval functionality is not covered by tests
commit https://github.com/vim/vim/commit/17aca707f92235b6f962e637e8073162d18e6de2
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 16 22:24:55 2019 +0200
patch 8.1.1336: some eval functionality is not covered by tests
Problem: Some eval functionality is not covered by tests.
Solution: Add a few more test cases. (Masato Nishihata, closes https://github.com/vim/vim/issues/4374)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 16 May 2019 22:30:06 +0200 |
parents | a3b5cbd2effe |
children | 9c90cf08cfa8 |
line wrap: on
line diff
--- a/src/testdir/test_bufline.vim +++ b/src/testdir/test_bufline.vim @@ -8,7 +8,7 @@ func Test_setbufline_getbufline() hide call assert_equal(0, setbufline(b, 1, ['foo', 'bar'])) call assert_equal(['foo'], getbufline(b, 1)) - call assert_equal(['bar'], getbufline(b, 2)) + call assert_equal(['bar'], getbufline(b, '$')) call assert_equal(['foo', 'bar'], getbufline(b, 1, 2)) exe "bd!" b call assert_equal([], getbufline(b, 1, 2)) @@ -81,6 +81,7 @@ func Test_appendbufline() call setline(1, ['a', 'b', 'c']) let b = bufnr('%') wincmd w + call assert_equal(1, appendbufline(b, -1, ['x'])) call assert_equal(1, appendbufline(b, 4, ['x'])) call assert_equal(1, appendbufline(1234, 1, ['x'])) call assert_equal(0, appendbufline(b, 3, ['d', 'e'])) @@ -130,8 +131,11 @@ func Test_deletebufline() exe "bd!" b call assert_equal(1, deletebufline(b, 1)) + call assert_equal(1, deletebufline(-1, 1)) + split Xtest call setline(1, ['a', 'b', 'c']) + call cursor(line('$'), 1) let b = bufnr('%') wincmd w call assert_equal(1, deletebufline(b, 4))