diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-07-13 13:47:01 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-07-14 15:40:07 +0800 |
| commit | 314f1a7c2168ee7e99e2d2b348146df092341a64 (patch) | |
| tree | 22837cb423804c7d9ac5c3cd80aa2932540865c2 /src/nvim/testdir/test_marks.vim | |
| parent | bf96b9f11d1f960006a1b5d5d363bbf804fe84e9 (diff) | |
| download | rneovim-314f1a7c2168ee7e99e2d2b348146df092341a64.tar.gz rneovim-314f1a7c2168ee7e99e2d2b348146df092341a64.tar.bz2 rneovim-314f1a7c2168ee7e99e2d2b348146df092341a64.zip | |
vim-patch:8.2.0369: various Normal mode commands not fully tested
Problem: Various Normal mode commands not fully tested.
Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5751)
https://github.com/vim/vim/commit/1671f4488105ee12a6a8558ae351436c26ab55fc
Cherry-pick a fix from patch 8.2.3162.
Omit test_iminsert.vim as previous patches to that file are N/A, and
Nvim doesn't support iminsert=2 either, so that test isn't useful.
Diffstat (limited to 'src/nvim/testdir/test_marks.vim')
| -rw-r--r-- | src/nvim/testdir/test_marks.vim | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_marks.vim b/src/nvim/testdir/test_marks.vim index 608f9883c2..8f94224128 100644 --- a/src/nvim/testdir/test_marks.vim +++ b/src/nvim/testdir/test_marks.vim @@ -215,6 +215,7 @@ func Test_mark_error() call assert_fails('mark', 'E471:') call assert_fails('mark xx', 'E488:') call assert_fails('mark _', 'E191:') + call assert_beeps('normal! m~') endfunc " Test for :lockmarks when pasting content @@ -241,6 +242,29 @@ func Test_marks_k_cmd() close! endfunc +" Test for file marks (A-Z) +func Test_file_mark() + new Xone + call setline(1, ['aaa', 'bbb']) + norm! G$mB + w! + new Xtwo + call setline(1, ['ccc', 'ddd']) + norm! GmD + w! + + enew + normal! `B + call assert_equal('Xone', bufname()) + call assert_equal([2, 3], [line('.'), col('.')]) + normal! 'D + call assert_equal('Xtwo', bufname()) + call assert_equal([2, 1], [line('.'), col('.')]) + + call delete('Xone') + call delete('Xtwo') +endfunc + " Test for the getmarklist() function func Test_getmarklist() new |