Mercurial > vim
changeset 7643:2b2e90fcd72b v7.4.1121
commit https://github.com/vim/vim/commit/08b270a8a4544be9a7fecce311834fde2b457634
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 17 18:34:19 2016 +0100
patch 7.4.1121
Problem: test_expand leaves files behind.
Solution: Edit another file before deleting, otherwise the swap file
remains.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 17 Jan 2016 18:45:04 +0100 |
parents | a011a3e63dd3 |
children | db5cd097d9d7 |
files | src/testdir/test_expand.vim src/version.c |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_expand.vim +++ b/src/testdir/test_expand.vim @@ -20,10 +20,13 @@ func Test_with_directories() next! Xdir?/*/nofile call assert_equal('Xdir?/*/nofile', expand('%')) endif + " Edit another file, on MS-Windows the swap file would be in use and can't + " be deleted. + edit foo - call delete('Xdir1', 'rf') - call delete('Xdir2', 'rf') - call delete('Xdir3', 'rf') + call assert_equal(0, delete('Xdir1', 'rf')) + call assert_equal(0, delete('Xdir2', 'rf')) + call assert_equal(0, delete('Xdir3', 'rf')) endfunc func Test_with_tilde()