aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-17 23:02:47 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-11-17 23:02:59 +0800
commitd8fc390bd04a69f43983fc355026a2f216410318 (patch)
tree0b313eba444eda71a29c30caa617d76e8ff7c974
parentacfc3d54c6fc5b22adab057962c493b059a91fe7 (diff)
downloadrneovim-d8fc390bd04a69f43983fc355026a2f216410318.tar.gz
rneovim-d8fc390bd04a69f43983fc355026a2f216410318.tar.bz2
rneovim-d8fc390bd04a69f43983fc355026a2f216410318.zip
vim-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. https://github.com/vim/vim/commit/f2a8bafa4b815e5b4e50a25c2b3a8a24fbe8aa11 Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r--src/nvim/testdir/test_recover.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_recover.vim b/src/nvim/testdir/test_recover.vim
index 137c73a194..9d38b0ebea 100644
--- a/src/nvim/testdir/test_recover.vim
+++ b/src/nvim/testdir/test_recover.vim
@@ -175,6 +175,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')