Skip to content

Commit e9c0727

Browse files
committed
patch 7.4.1686
Problem: When running tests $HOME/.viminfo is written. (James McCoy) Solution: Add 'nviminfo' to the 'viminfo' option. (closes #722)
1 parent 7db8f6f commit e9c0727

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/testdir/runtest.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ lang mess C
5555
" Always use forward slashes.
5656
set shellslash
5757

58+
" Make sure $HOME does not get read or written.
59+
let $HOME = '/does/not/exist'
60+
5861
let s:srcdir = expand('%:p:h:h')
5962

6063
" Support function: get the alloc ID by name.
@@ -141,7 +144,6 @@ for s:test in sort(s:tests)
141144
call extend(s:errors, v:errors)
142145
let v:errors = []
143146
endif
144-
145147
endfor
146148

147149
if s:fail == 0

src/testdir/test_backspace_opt.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func Test_backspace_option()
5353
" Cleared when 'compatible' is set
5454
set compatible
5555
call assert_equal('', &backspace)
56-
set nocompatible
56+
set nocompatible viminfo+=nviminfo
5757
endfunc
5858

5959
" vim: tabstop=2 shiftwidth=0 expandtab

src/testdir/test_viminfo.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func Test_global_vars()
3636
" store a really long list, so line wrapping will occur in viminfo file
3737
let test_list = range(1,100)
3838
let g:MY_GLOBAL_LIST = test_list
39-
set viminfo='100,<50,s10,h,!
39+
set viminfo='100,<50,s10,h,!,nviminfo
4040
wv! Xviminfo
4141
unlet g:MY_GLOBAL_DICT
4242
unlet g:MY_GLOBAL_LIST

src/version.c

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

749749
static int included_patches[] =
750750
{ /* Add new patch number below this line */
751+
/**/
752+
1686,
751753
/**/
752754
1685,
753755
/**/

0 commit comments

Comments
 (0)