From e8af051f1bfa0791a294ab3725dce1dca1cd8d6b Mon Sep 17 00:00:00 2001 From: Sean Dewar Date: Fri, 14 Jan 2022 15:05:48 +0000 Subject: test(oldtest): partially port v8.1.2381 Problem: Not all register related code is covered by tests. Solution: Add more test cases. (Yegappan Lakshmanan, closes vim/vim#5301) https://github.com/vim/vim/commit/54c8d229f54e36e89fcd5d84e523fd894d018024 Can't be fully ported until "set clipboard=autoselect,autoselectplus" is re-implemented for Test_clipboard_regs (and last visual selection to PRIMARY selection works). --- src/nvim/testdir/test_marks.vim | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/nvim/testdir/test_marks.vim') diff --git a/src/nvim/testdir/test_marks.vim b/src/nvim/testdir/test_marks.vim index b3035d73ce..4ef42946cb 100644 --- a/src/nvim/testdir/test_marks.vim +++ b/src/nvim/testdir/test_marks.vim @@ -207,6 +207,21 @@ func Test_mark_error() call assert_fails('mark _', 'E191:') endfunc +" Test for :lockmarks when pasting content +func Test_lockmarks_with_put() + new + call append(0, repeat(['sky is blue'], 4)) + normal gg + 1,2yank r + put r + normal G + lockmarks put r + call assert_equal(2, line("'[")) + call assert_equal(3, line("']")) + + bwipe! +endfunc + " Test for the getmarklist() function func Test_getmarklist() new @@ -231,3 +246,5 @@ func Test_getmarklist() call assert_equal([], {}->getmarklist()) close! endfunc + +" vim: shiftwidth=2 sts=2 expandtab -- cgit