Skip to content

Commit c28cb5b

Browse files
committed
patch 8.1.1436: writefile test fails when run under /tmp
Problem: Writefile test fails when run under /tmp. Solution: Adjust 'backupskip. (Kenta Sato, closes #4462)
1 parent 5d508dd commit c28cb5b

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/testdir/test_writefile.vim

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func Test_writefile_fails_conversion()
3838
endif
3939
" Without a backup file the write won't happen if there is a conversion
4040
" error.
41-
set nobackup nowritebackup
41+
set nobackup nowritebackup backupdir=. backupskip=
4242
new
4343
let contents = ["line one", "line two"]
4444
call writefile(contents, 'Xfile')
@@ -49,7 +49,7 @@ func Test_writefile_fails_conversion()
4949

5050
call delete('Xfile')
5151
bwipe!
52-
set backup& writebackup&
52+
set backup& writebackup& backupdir&vim backupskip&vim
5353
endfunc
5454

5555
func Test_writefile_fails_conversion2()
@@ -58,7 +58,7 @@ func Test_writefile_fails_conversion2()
5858
endif
5959
" With a backup file the write happens even if there is a conversion error,
6060
" but then the backup file must remain
61-
set nobackup writebackup
61+
set nobackup writebackup backupdir=. backupskip=
6262
let contents = ["line one", "line two"]
6363
call writefile(contents, 'Xfile_conversion_err')
6464
edit Xfile_conversion_err
@@ -71,6 +71,7 @@ func Test_writefile_fails_conversion2()
7171
call delete('Xfile_conversion_err')
7272
call delete('Xfile_conversion_err~')
7373
bwipe!
74+
set backup& writebackup& backupdir&vim backupskip&vim
7475
endfunc
7576

7677
func SetFlag(timer)

src/version.c

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

768768
static int included_patches[] =
769769
{ /* Add new patch number below this line */
770+
/**/
771+
1436,
770772
/**/
771773
1435,
772774
/**/

0 commit comments

Comments
 (0)