diff src/testdir/test_marks.vim @ 19625:f70a3c1000bb v8.2.0369

patch 8.2.0369: various Normal mode commands not fully tested Commit: https://github.com/vim/vim/commit/1671f4488105ee12a6a8558ae351436c26ab55fc Author: Bram Moolenaar <Bram@vim.org> Date: Tue Mar 10 07:48:13 2020 +0100 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 https://github.com/vim/vim/issues/5751)
author Bram Moolenaar <Bram@vim.org>
date Tue, 10 Mar 2020 08:00:06 +0100
parents 2f4be7ca1b1b
children b3e93a05c3ca
line wrap: on
line diff
--- a/src/testdir/test_marks.vim
+++ b/src/testdir/test_marks.vim
@@ -195,6 +195,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
@@ -221,4 +222,27 @@ 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
+
 " vim: shiftwidth=2 sts=2 expandtab