diff src/testdir/test_viminfo.vim @ 9414:1003973c99df v7.4.1988

commit https://github.com/vim/vim/commit/ab9c89b68dcbdb3fbda8c5a50dd90caca64f1bfd Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 3 17:47:26 2016 +0200 patch 7.4.1988 Problem: When updating viminfo with file marks there is no time order. Solution: Remember the time when a buffer was last used, store marks for the most recently used buffers.
author Christian Brabandt <cb@256bit.org>
date Sun, 03 Jul 2016 18:00:05 +0200
parents c0760b25f31d
children 42adbf172ecd
line wrap: on
line diff
--- a/src/testdir/test_viminfo.vim
+++ b/src/testdir/test_viminfo.vim
@@ -395,3 +395,33 @@ func Test_viminfo_bad_syntax()
   call delete('Xviminfo')
 endfunc
 
+func Test_viminfo_file_marks()
+  silent! bwipe test_viminfo.vim
+  silent! bwipe Xviminfo
+
+  call test_settime(10)
+  edit ten
+  call test_settime(25)
+  edit again
+  call test_settime(30)
+  edit thirty
+  wviminfo Xviminfo
+
+  call test_settime(20)
+  edit twenty
+  call test_settime(35)
+  edit again
+  call test_settime(40)
+  edit fourty
+  wviminfo Xviminfo
+
+  sp Xviminfo
+  1
+  for name in ['fourty', 'again', 'thirty', 'twenty', 'ten']
+    /^>
+    call assert_equal(name, substitute(getline('.'), '.*/', '', ''))
+  endfor
+  close
+
+  call delete('Xviminfo')
+endfunc