test(old): align defaults to Vim before each test instead

This commit is contained in:
zeertzjq
2022-07-11 21:10:27 +08:00
parent 5c3bbb67e7
commit e71cc4a8dc
2 changed files with 34 additions and 33 deletions

View File

@@ -153,6 +153,9 @@ func RunTheTest(test)
" directory after executing the test.
let save_cwd = getcwd()
" Align Nvim defaults to Vim.
source setup.vim
if exists("*SetUp")
try
call SetUp()
@@ -191,9 +194,6 @@ func RunTheTest(test)
endtry
endif
" Align Nvim defaults to Vim.
source setup.vim
" Clear any autocommands and put back the catch-all for SwapExists.
au!
au SwapExists * call HandleSwapExists()

View File

@@ -1,33 +1,34 @@
" Align Nvim defaults to Vim.
set backspace=
set complete=.,w,b,u,t,i
set directory&
set directory^=.
set fillchars=vert:\|,fold:-
set formatoptions=tcq
set fsync
set laststatus=1
set listchars=eol:$
set joinspaces
set nohidden nosmarttab noautoindent noautoread noruler noshowcmd
set nohlsearch noincsearch
set nrformats=bin,octal,hex
set shortmess=filnxtToOS
set sidescroll=0
set tags=./tags,tags
set undodir&
set undodir^=.
set wildoptions=
set startofline
set sessionoptions&
set sessionoptions+=options
set viewoptions&
set viewoptions+=options
set switchbuf=
" Make "Q" switch to Ex mode.
" This does not work for all tests.
nnoremap Q gQ
if exists('s:did_load')
" Align Nvim defaults to Vim.
set backspace=
set complete=.,w,b,u,t,i
set directory&
set directory^=.
set fillchars=vert:\|,fold:-
set formatoptions=tcq
set fsync
set laststatus=1
set listchars=eol:$
set joinspaces
set nohidden nosmarttab noautoindent noautoread noruler noshowcmd
set nohlsearch noincsearch
set nrformats=bin,octal,hex
set shortmess=filnxtToOS
set sidescroll=0
set tags=./tags,tags
set undodir&
set undodir^=.
set wildoptions=
set startofline
set sessionoptions&
set sessionoptions+=options
set viewoptions&
set viewoptions+=options
set switchbuf=
" Make "Q" switch to Ex mode.
" This does not work for all tests.
nnoremap Q gQ
endif
" Common preparations for running tests.