changeset 25810:2db73f521d49 v8.2.3440

patch 8.2.3440: recover test fails if there is an old swap file Commit: https://github.com/vim/vim/commit/f2a8bafa4b815e5b4e50a25c2b3a8a24fbe8aa11 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Sep 14 22:58:23 2021 +0200 patch 8.2.3440: recover test fails if there is an old swap file Problem: Recover test fails if there is an old swap file. Solution: Delete old swap files.
author Bram Moolenaar <Bram@vim.org>
date Tue, 14 Sep 2021 23:00:05 +0200
parents e2856a7a2594
children c80c8cbb6d4d
files src/testdir/test_recover.vim src/version.c
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_recover.vim
+++ b/src/testdir/test_recover.vim
@@ -170,6 +170,12 @@ func Test_recover_empty_swap_file()
   call assert_match('Unable to read block 0 from .Xfile1.swp', msg)
   call assert_equal('Xfile1', @%)
   bw!
+
+  " make sure there are no old swap files laying around
+  for f in glob('.sw?', 0, 1)
+    call delete(f)
+  endfor
+
   " :recover from an empty buffer
   call assert_fails('recover', 'E305:')
   call delete('.Xfile1.swp')
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    3440,
+/**/
     3439,
 /**/
     3438,