Skip to content

Commit de37e74

Browse files
koronchrisbra
authored andcommitted
patch 9.1.2009: tests: "Xm4" test directory may not be deleted
Problem: tests: "Xm4" test directory may not be deleted Solution: Use "R" flag with mkdir() call to have the directory recursively deleted at the end of function Test_m4_format() (Muraoka Taro) Test_m4_format in test_filetype.vim creates the "Xm4" directory with the 'D' flag. Then it creates two files in the "Xm4" directory. One of them, "alocal.m4," was created with the 'D' flag, so it will disappear after the test is complete. However, the other, "configure.ac," was created without any flags, so it will remain even after the test is complete. Because the parent directory "Xm4" was created with the 'D' flag, the latter "configure.ac" remains and is not empty, so it will not be deleted. This forces the directory to be deleted regardless of its contents. As a result, the two files "alocal.m4" and "configure.ac" created in the directory are no longer needed, so they have been deleted. closes: #18995 Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 9c99822 commit de37e74

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/testdir/test_filetype.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3235,9 +3235,9 @@ endfunc
32353235
func Test_m4_format()
32363236
filetype on
32373237

3238-
call mkdir('Xm4', 'D')
3238+
call mkdir('Xm4', 'R')
32393239
cd Xm4
3240-
call writefile([''], 'alocal.m4', 'D')
3240+
call writefile([''], 'alocal.m4')
32413241
split alocal.m4
32423242
call assert_equal('m4', &filetype)
32433243
bwipe!

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,8 @@ static char *(features[]) =
734734

735735
static int included_patches[] =
736736
{ /* Add new patch number below this line */
737+
/**/
738+
2009,
737739
/**/
738740
2008,
739741
/**/

0 commit comments

Comments
 (0)