patch 7.4.1686 v7.4.1686
authorBram Moolenaar <Bram@vim.org>
Wed, 30 Mar 2016 18:50:46 +0000 (20:50 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 30 Mar 2016 18:50:46 +0000 (20:50 +0200)
Problem:    When running tests $HOME/.viminfo is written. (James McCoy)
Solution:   Add 'nviminfo' to the 'viminfo' option. (closes #722)

src/testdir/runtest.vim
src/testdir/test_backspace_opt.vim
src/testdir/test_viminfo.vim
src/version.c

index 0cf50006db7fb4222e7297568a92c0afeb403499..4d75af3ee9b3f43b1478f832c91914b1203df30a 100644 (file)
@@ -55,6 +55,9 @@ lang mess C
 " Always use forward slashes.
 set shellslash
 
+" Make sure $HOME does not get read or written.
+let $HOME = '/does/not/exist'
+
 let s:srcdir = expand('%:p:h:h')
 
 " Support function: get the alloc ID by name.
@@ -141,7 +144,6 @@ for s:test in sort(s:tests)
     call extend(s:errors, v:errors)
     let v:errors = []
   endif
-
 endfor
 
 if s:fail == 0
index f80e831e9aa1ba22b481c3cb71fee400c656cf8b..7fbba96c6669ce3c50d41ddc45b0751df2afdef4 100644 (file)
@@ -53,7 +53,7 @@ func Test_backspace_option()
   " Cleared when 'compatible' is set
   set compatible
   call assert_equal('', &backspace)
-  set nocompatible
+  set nocompatible viminfo+=nviminfo
 endfunc
 
 " vim: tabstop=2 shiftwidth=0 expandtab
index 3efe75e82632ac51779c2c3eada634bdc8949fc6..a979ab99671953bb6628e61622d9f5b480ea15aa 100644 (file)
@@ -36,7 +36,7 @@ func Test_global_vars()
   " store a really long list, so line wrapping will occur in viminfo file
   let test_list = range(1,100)
   let g:MY_GLOBAL_LIST = test_list
-  set viminfo='100,<50,s10,h,!
+  set viminfo='100,<50,s10,h,!,nviminfo
   wv! Xviminfo
   unlet g:MY_GLOBAL_DICT
   unlet g:MY_GLOBAL_LIST
index 1b34431723a5d6d3de5ab887a8d81e067d4c6cb2..f2976cb22f39218146bd467b6cae323f804266fa 100644 (file)
@@ -748,6 +748,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1686,
 /**/
     1685,
 /**/