1
0
forked from aniani/vim

patch 9.1.1312: tests: Test_backupskip() fails when HOME is defined

Problem:  tests: Test_backupskip() fails when HOME is defined
Solution: unset $HOME temporarily

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2025-04-16 20:25:47 +02:00
parent 0ac1eb3555
commit ad503fe927
2 changed files with 6 additions and 1 deletions

View File

@@ -1168,11 +1168,14 @@ func Test_backupskip()
call setenv(var, '/duplicate/path')
endfor
" unset $HOME, so that it won't try to read init files
let saveenv['HOME'] = getenv("HOME")
call setenv('HOME', v:null)
exe 'silent !' . cmd
call assert_equal(['errors:'], readfile('Xtestout'))
" restore environment variables
for var in ['TMPDIR', 'TMP', 'TEMP']
for var in ['TMPDIR', 'TMP', 'TEMP', 'HOME']
call setenv(var, saveenv[var])
endfor

View File

@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1312,
/**/
1311,
/**/