Mercurial > vim
comparison src/testdir/test_expand.vim @ 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 | 2720952e9acb |
children | c62601adad69 |
comparison
equal
deleted
inserted
replaced
7642:a011a3e63dd3 | 7643:2b2e90fcd72b |
---|---|
18 call assert_equal('Xdir3/Xdir4/file', expand('%')) | 18 call assert_equal('Xdir3/Xdir4/file', expand('%')) |
19 if has('unix') | 19 if has('unix') |
20 next! Xdir?/*/nofile | 20 next! Xdir?/*/nofile |
21 call assert_equal('Xdir?/*/nofile', expand('%')) | 21 call assert_equal('Xdir?/*/nofile', expand('%')) |
22 endif | 22 endif |
23 " Edit another file, on MS-Windows the swap file would be in use and can't | |
24 " be deleted. | |
25 edit foo | |
23 | 26 |
24 call delete('Xdir1', 'rf') | 27 call assert_equal(0, delete('Xdir1', 'rf')) |
25 call delete('Xdir2', 'rf') | 28 call assert_equal(0, delete('Xdir2', 'rf')) |
26 call delete('Xdir3', 'rf') | 29 call assert_equal(0, delete('Xdir3', 'rf')) |
27 endfunc | 30 endfunc |
28 | 31 |
29 func Test_with_tilde() | 32 func Test_with_tilde() |
30 let dir = getcwd() | 33 let dir = getcwd() |
31 call mkdir('Xdir ~ dir') | 34 call mkdir('Xdir ~ dir') |