1
0
forked from aniani/vim

patch 8.0.1704: 'backupskip' default doesn't work for Mac

Problem:    'backupskip' default doesn't work for Mac.
Solution:   Use "/private/tmp". (Rainer Müller, closes #2793)
This commit is contained in:
Bram Moolenaar
2018-04-12 21:37:34 +02:00
parent 527dec3f94
commit b8e22a053b
4 changed files with 25 additions and 1 deletions

View File

@@ -332,3 +332,19 @@ func Test_set_indentexpr()
call assert_equal('', &indentexpr)
bwipe!
endfunc
func Test_backupskip()
if has("mac")
call assert_match('/private/tmp/\*', &bsk)
elseif has("unix")
call assert_match('/tmp/\*', &bsk)
endif
let bskvalue = substitute(&bsk, '\\', '/', 'g')
for var in ['$TEMPDIR', '$TMP', '$TEMP']
if exists(var)
let varvalue = substitute(expand(var), '\\', '/', 'g')
call assert_match(varvalue . '.\*', bskvalue)
endif
endfor
endfunc