Merge pull request #1699 from three-comrades/fix-viminfo

Use a local viminfo file when running the old tests.
This commit is contained in:
Justin M. Keyes 2014-12-19 00:32:28 -05:00
commit b1cd16ab8d
25 changed files with 14 additions and 24 deletions

View File

@ -94,7 +94,7 @@ $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG) test1.out
RM_ON_RUN := test.out X* viminfo RM_ON_RUN := test.out X* viminfo
RM_ON_START := tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok RM_ON_START := tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok
RUN_VIM := VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(TOOL) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in RUN_VIM := VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(TOOL) $(VIMPROG) -u unix.vim -U NONE -i viminfo --noplugin -s dotest.in
clean: clean:
-rm -rf *.out \ -rm -rf *.out \

View File

@ -2,7 +2,7 @@ Tests for 'undolevel' setting being global-local
STARTTEST STARTTEST
:so small.vim :so small.vim
:set nocompatible viminfo+=nviminfo ul=5 :set ul=5
:fu! FillBuffer() :fu! FillBuffer()
:for i in range(1,13) :for i in range(1,13)
:put=i :put=i

View File

@ -5,7 +5,6 @@ Tests for 'directory' option.
STARTTEST STARTTEST
:so small.vim :so small.vim
:set nocompatible viminfo+=nviminfo
:set dir=.,~ :set dir=.,~
:/start of testfile/,/end of testfile/w! Xtest1 :/start of testfile/,/end of testfile/w! Xtest1
:" do an ls of the current dir to find the swap file (should not be there) :" do an ls of the current dir to find the swap file (should not be there)

View File

@ -12,7 +12,6 @@ STARTTEST
:set fo+=tcroql tw=72 :set fo+=tcroql tw=72
/xxxxxxxx$ /xxxxxxxx$
0gq6kk 0gq6kk
:set nocp viminfo+=nviminfo
:" undo/redo here to make the next undo only work on the following changes :" undo/redo here to make the next undo only work on the following changes
u u
:map gg :.,.+2s/^/x/<CR>kk:set tw=3<CR>gqq :map gg :.,.+2s/^/x/<CR>kk:set tw=3<CR>gqq

Binary file not shown.

View File

@ -5,7 +5,6 @@ Test for joining lines and marks in them
STARTTEST STARTTEST
:so small.vim :so small.vim
:set viminfo+=nviminfo
:set nojoinspaces :set nojoinspaces
:set cpoptions-=j :set cpoptions-=j
/firstline/ /firstline/

View File

@ -4,7 +4,7 @@ Test for 'cindent'
STARTTEST STARTTEST
:so small.vim :so small.vim
:set nocompatible viminfo+=nviminfo modeline :set modeline
:edit " read modeline :edit " read modeline
/start of AUTO /start of AUTO
=/end of AUTO =/end of AUTO

View File

@ -22,7 +22,7 @@ Test for insert expansion
STARTTEST STARTTEST
:so small.vim :so small.vim
:se nocp viminfo+=nviminfo cpt=.,w ff=unix | $-2,$w!Xtestfile | set ff& :se cpt=.,w ff=unix | $-2,$w!Xtestfile | set ff&
:se cot= :se cot=
nO#include "Xtestfile" nO#include "Xtestfile"
ru ru

View File

@ -4,7 +4,7 @@ See test99 for exactly the same test with re=2.
STARTTEST STARTTEST
:so mbyte.vim :so mbyte.vim
:set nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo :set encoding=utf-8 termencoding=latin1
:set re=1 :set re=1
/^1 /^1
/a*b\{2}c\+/e /a*b\{2}c\+/e

View File

@ -5,7 +5,7 @@ test49.failed, try to add one or more "G"s at the line ending in "test.out"
STARTTEST STARTTEST
:so small.vim :so small.vim
:se nocp nomore viminfo+=nviminfo :se nomore
:lang mess C :lang mess C
:so test49.vim :so test49.vim
GGGGGGGGGGGGGG"rp:.-,$w! test.out GGGGGGGGGGGGGG"rp:.-,$w! test.out

View File

@ -85,7 +85,6 @@ ggO---:0put b
ggO---:0put a ggO---:0put a
ggO---:w >>test.out ggO---:w >>test.out
:so small.vim :so small.vim
:set nocp viminfo+=nviminfo
:enew! :enew!
oa oa
:set ul=100 :set ul=100

View File

@ -2,7 +2,6 @@ Smoke test for MzScheme interface and mzeval() function
STARTTEST STARTTEST
:so mzscheme.vim :so mzscheme.vim
:set nocompatible viminfo+=nviminfo
:function! MzRequire() :function! MzRequire()
:redir => l:mzversion :redir => l:mzversion
:mz (version) :mz (version)

View File

@ -6,7 +6,7 @@ STARTTEST
:so small.vim :so small.vim
:" :"
:" Test 'undofile': first a simple one-line change. :" Test 'undofile': first a simple one-line change.
:set nocompatible viminfo+=nviminfo visualbell :set visualbell
:set ul=100 undofile nomore :set ul=100 undofile nomore
:set ft=unix :set ft=unix
:e! Xtestfile :e! Xtestfile

View File

@ -7,7 +7,6 @@ STARTTEST
:" :"
:" This will cause a few errors, do it silently. :" This will cause a few errors, do it silently.
:set visualbell :set visualbell
:set nocp viminfo+=nviminfo
:" :"
:function! DeleteDirectory(dir) :function! DeleteDirectory(dir)
: if has("win16") || has("win32") || has("win64") || has("dos16") || has("dos32") : if has("win16") || has("win32") || has("win64") || has("dos16") || has("dos32")

View File

@ -7,7 +7,7 @@ STARTTEST
:" :"
:" This will cause a few errors, do it silently. :" This will cause a few errors, do it silently.
:set visualbell :set visualbell
:set nocp viminfo+=!,nviminfo :set viminfo+=!
:let MY_GLOBAL_DICT={'foo': 1, 'bar': 0, 'longvarible': 1000} :let MY_GLOBAL_DICT={'foo': 1, 'bar': 0, 'longvarible': 1000}
:" store a really long list, so line wrapping will occur in viminfo file :" store a really long list, so line wrapping will occur in viminfo file
:let MY_GLOBAL_LIST=range(1,100) :let MY_GLOBAL_LIST=range(1,100)

View File

@ -6,7 +6,7 @@ blocks.
STARTTEST STARTTEST
:so small.vim :so small.vim
:set nocp fileformat=unix undolevels=-1 viminfo+=nviminfo :set fileformat=unix undolevels=-1
:e! Xtest :e! Xtest
ggdG ggdG
:let text = "\tabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparstuvwxyz0123456789" :let text = "\tabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparstuvwxyz0123456789"

View File

@ -32,7 +32,7 @@ endfunc
$put ='VimLeave done' $put ='VimLeave done'
write write
endfunc endfunc
:set viminfo='100,nviminfo :set viminfo='100
:au BufUnload * call CloseAll() :au BufUnload * call CloseAll()
:au VimLeave * call WriteToOut() :au VimLeave * call WriteToOut()
:e small.vim :e small.vim

View File

@ -3,7 +3,6 @@ Test for Lua interface and luaeval() function
STARTTEST STARTTEST
:so small.vim :so small.vim
:so lua.vim :so lua.vim
:set nocompatible viminfo+=nviminfo
:lua l = vim.list():add"item0":add"dictionary with list OK":add"item2" :lua l = vim.list():add"item0":add"dictionary with list OK":add"item2"
:lua h = vim.dict(); h.list = l :lua h = vim.dict(); h.list = l
:call garbagecollect() :call garbagecollect()

View File

@ -5,7 +5,7 @@
STARTTEST STARTTEST
:so small.vim :so small.vim
:set hidden nocp nu rnu viminfo+=nviminfo :set hidden nu rnu
:redir @a | set nu? rnu? | redir END :redir @a | set nu? rnu? | redir END
:e! xx :e! xx
:redir @b | set nu? rnu? | redir END :redir @b | set nu? rnu? | redir END

View File

@ -17,7 +17,6 @@ Test cases:
STARTTEST STARTTEST
:so small.vim :so small.vim
:set nocp viminfo+=nviminfo
: :
:" User functions :" User functions
:function MoveToCap() :function MoveToCap()

View File

@ -7,7 +7,7 @@ actually tried.
STARTTEST STARTTEST
:so small.vim :so small.vim
:so mbyte.vim :so mbyte.vim
:set nocp encoding=utf-8 viminfo+=nviminfo nomore :set encoding=utf-8 nomore
:" tl is a List of Lists with: :" tl is a List of Lists with:
:" 2: test auto/old/new 0: test auto/old 1: test auto/new :" 2: test auto/old/new 0: test auto/old 1: test auto/new
:" regexp pattern :" regexp pattern

View File

@ -4,7 +4,7 @@ See test44 for exactly the same test with re=1.
STARTTEST STARTTEST
:so mbyte.vim :so mbyte.vim
:set nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo :set encoding=utf-8 termencoding=latin1
:set re=2 :set re=2
/^1 /^1
/a*b\{2}c\+/e /a*b\{2}c\+/e

View File

@ -81,7 +81,7 @@ STARTTEST
:" https://groups.google.com/d/msg/vim_dev/ZOdg2mc9c9Y/TT8EhFjEy0IJ :" https://groups.google.com/d/msg/vim_dev/ZOdg2mc9c9Y/TT8EhFjEy0IJ
:only :only
:vert 20new :vert 20new
:set all& nocp breakindent briopt=min:10 :set all& breakindent briopt=min:10
:call setline(1, [" a\tb\tc\td\te", " z y x w v"]) :call setline(1, [" a\tb\tc\td\te", " z y x w v"])
:/^\s*a :/^\s*a
fbgjyl:let line1 = @0 fbgjyl:let line1 = @0

View File

@ -10,7 +10,6 @@ describe('expand file name', function()
setup(clear) setup(clear)
it('is working', function() it('is working', function()
execute('set nocp')
execute('!mkdir Xdir1') execute('!mkdir Xdir1')
execute('!mkdir Xdir2') execute('!mkdir Xdir2')
execute('!mkdir Xdir3') execute('!mkdir Xdir3')

View File

@ -21,7 +21,6 @@ describe('regexp with magic settings', function()
9 foobar 9 foobar
]]) ]])
execute('set nocompatible viminfo+=nviminfo')
execute('/^1') execute('/^1')
execute([[/a*b\{2}c\+/e]]) execute([[/a*b\{2}c\+/e]])
feed([[x/\Md\*e\{2}f\+/e<cr>]]) feed([[x/\Md\*e\{2}f\+/e<cr>]])