neovim/src/nvim/testdir/setup.vim

56 lines
1.3 KiB
VimL
Raw Normal View History

" Common preparations for running tests.
" Only load this once.
if exists('s:did_load')
finish
endif
let s:did_load = 1
" Align Nvim defaults to Vim.
set backspace=
set directory^=.
set fillchars=vert:\|,fold:-
2019-02-04 20:53:03 -07:00
set laststatus=1
set listchars=eol:$
set nohidden smarttab noautoindent noautoread complete-=i noruler noshowcmd
set nrformats+=octal
set shortmess-=F
set sidescroll=0
set tags=./tags,tags
set undodir^=.
set wildoptions=
set startofline
vim-patch:8.1.0734: the hlsearch state is not stored in a session file (#13547) Problem: The hlsearch state is not stored in a session file. Solution: Add "nohlsearch" if appropriate. (Jason Franklin) https://github.com/vim/vim/commit/e3c74d249ac36404d8af25f74baf335d143b30e3 Vi default for 'sessionoptions' includes 'options'. Use 'set sessionoptions&vi' to use Vim's default 'sessionoptions'. If a test sets 'sessionoptions', reset 'sessionoptions' at the end of the test. N/A patches for version.c: vim-patch:8.2.0119: message test fails on some platforms Problem: Message test fails on some platforms. (Elimar Riesebieter) Solution: Add type cast to vim_snprintf() argument. (Dominique Pelle) https://github.com/vim/vim/commit/1470dc35c4b14bda1995b7566c9a41a33eb06517 vim-patch:8.2.0234: message test fails on SunOS Problem: Message test fails on SunOS. Solution: Adjust expectation for printf "%p". (Ozaki Kiichi, closes vim/vim#5595) https://github.com/vim/vim/commit/d5b991493816a2edba7cacdd06820cf3c0abc4dc vim-patch:8.2.2149: popupwin test for latin1 sometimes fails Problem: Popupwin test for latin1 sometimes fails. Solution: Wait for the script to finish. https://github.com/vim/vim/commit/4c5bdb99ad632d703e94fffafba11b91861fea48 vim-patch:8.2.2150: Github actions CI isn't used for all available platforms Problem: Github actions CI isn't used for all available platforms. Solution: Update the github workflows. (Ozaki Kiichi, closes vim/vim#7433) https://github.com/vim/vim/commit/8ea05de6aa1d133cba3381bcc36adf1736b08e00 vim-patch:8.2.2151: $dir not expanded when configure checks for moonjit Problem: $dir not expanded when configure checks for moonjit. Solution: Use double quotes instead of single quotes. (closes vim/vim#7478) https://github.com/vim/vim/commit/a79a8944dade9115ccaa5a06a076dfb257e56c62 vim-patch:8.2.2153: popupwin test for latin1 still fails sometimes Problem: Popupwin test for latin1 still fails sometimes. Solution: Wait for the "cat" command to finish. https://github.com/vim/vim/commit/b125b535bb0456ab43c10683307a4bc359442d44 vim-patch:8.2.2154: popupwin test for terminal buffer fails sometimes Problem: Popupwin test for terminal buffer fails sometimes. Solution: Wait for the prompt to appear. https://github.com/vim/vim/commit/0353f56ddb379e7f1a68172fa4743355e04df21e
2020-12-17 19:13:17 -07:00
set sessionoptions&vi
" Prevent Nvim log from writing to stderr.
let $NVIM_LOG_FILE = exists($NVIM_LOG_FILE) ? $NVIM_LOG_FILE : 'Xnvim.log'
" Make sure 'runtimepath' and 'packpath' does not include $HOME.
set rtp=$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after
let &packpath = &rtp
" Avoid storing shell history.
let $HISTFILE = ""
" Use default shell on Windows to avoid segfault, caused by TUI
if has('win32')
let $SHELL = ''
let $TERM = ''
let &shell = empty($COMSPEC) ? exepath('cmd.exe') : $COMSPEC
set shellcmdflag=/s/c shellxquote=\" shellredir=>%s\ 2>&1
let &shellpipe = &shellredir
endif
" Detect user modules for language providers
let $PYTHONUSERBASE = $HOME . '/.local'
if executable('gem')
let $GEM_PATH = system('gem env gempath')
endif
" Make sure $HOME does not get read or written.
let $HOME = expand(getcwd() . '/XfakeHOME')
if !isdirectory($HOME)
call mkdir($HOME)
endif