summaryrefslogtreecommitdiff
path: root/src/testdir/test_options.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-04-12 21:37:34 +0200
committerBram Moolenaar <Bram@vim.org>2018-04-12 21:37:34 +0200
commitb8e22a053b68774dfd86fd829d9dba2333f09c05 (patch)
tree908dfccf2fb5c70c298fb5f0eb75f2a6c6acb4e3 /src/testdir/test_options.vim
parent527dec3f94c72096bf6baf4bb71f1a21dc7df89c (diff)
downloadvim-git-b8e22a053b68774dfd86fd829d9dba2333f09c05.tar.gz
patch 8.0.1704: 'backupskip' default doesn't work for Macv8.0.1704
Problem: 'backupskip' default doesn't work for Mac. Solution: Use "/private/tmp". (Rainer Müller, closes #2793)
Diffstat (limited to 'src/testdir/test_options.vim')
-rw-r--r--src/testdir/test_options.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim
index 5d2033a5d..0f2908fcb 100644
--- a/src/testdir/test_options.vim
+++ b/src/testdir/test_options.vim
@@ -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