diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-05-16 22:24:55 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-05-16 22:24:55 +0200 |
commit | 17aca707f92235b6f962e637e8073162d18e6de2 (patch) | |
tree | 35b570117e4f60a922adbdac39fc5fa5dc0857fb /src/testdir/test_bufline.vim | |
parent | dda4144d39a9d685b8dda830978e7410bd372c40 (diff) |
patch 8.1.1336: some eval functionality is not covered by testsv8.1.1336
Problem: Some eval functionality is not covered by tests.
Solution: Add a few more test cases. (Masato Nishihata, closes #4374)
Diffstat (limited to 'src/testdir/test_bufline.vim')
-rw-r--r-- | src/testdir/test_bufline.vim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/testdir/test_bufline.vim b/src/testdir/test_bufline.vim index d2d692922c..9c29a05e70 100644 --- 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)) |