]> granicus.if.org Git - vim/commitdiff
patch 8.2.3440: recover test fails if there is an old swap file v8.2.3440
authorBram Moolenaar <Bram@vim.org>
Tue, 14 Sep 2021 20:58:23 +0000 (22:58 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 14 Sep 2021 20:58:23 +0000 (22:58 +0200)
Problem:    Recover test fails if there is an old swap file.
Solution:   Delete old swap files.

src/testdir/test_recover.vim
src/version.c

index 6ef4376defea07bf20c7789c4f4c964e3868289c..9d2588313ea45b683d0b41a49ebf6188ab8c2fcd 100644 (file)
@@ -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')
index 47afcedb0534ccc58dae665a051085db3c7da9e7..0598475082c271ca51ced342bfe0f20293465e38 100644 (file)
@@ -755,6 +755,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3440,
 /**/
     3439,
 /**/