From f6a6db3e248dd6360dbd55574321ddc216848c13 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 17 Feb 2023 07:59:22 +0800 Subject: vim-patch:8.2.0148: mapping related function in wrong source file Problem: Mapping related function in wrong source file. Solution: Move the function. Add a few more test cases. (Yegappan Lakshmanan, closes vim/vim#5528) https://github.com/vim/vim/commit/7f51bbe0d19f1f0cb0321326f45a17b4f5155f89 Co-authored-by: Bram Moolenaar --- src/nvim/testdir/setup.vim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/nvim/testdir/setup.vim') diff --git a/src/nvim/testdir/setup.vim b/src/nvim/testdir/setup.vim index f895287469..25ac2d1239 100644 --- a/src/nvim/testdir/setup.vim +++ b/src/nvim/testdir/setup.vim @@ -26,9 +26,11 @@ if exists('s:did_load') set viewoptions& set viewoptions+=options set switchbuf= - " Make "Q" switch to Ex mode. - " This does not work for all tests. - nnoremap Q gQ + if g:testname !~ 'test_mapping.vim$' + " Make "Q" switch to Ex mode. + " This does not work for all tests. + nnoremap Q gQ + endif endif " Common preparations for running tests. -- cgit From af23d173883f47fd02a9a380c719e4428370b484 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 7 Mar 2023 04:13:04 +0100 Subject: test: move oldtests to test directory (#22536) The new oldtest directory is in test/old/testdir. The reason for this is that many tests have hardcoded the parent directory name to be 'testdir'. --- src/nvim/testdir/setup.vim | 85 ---------------------------------------------- 1 file changed, 85 deletions(-) delete mode 100644 src/nvim/testdir/setup.vim (limited to 'src/nvim/testdir/setup.vim') diff --git a/src/nvim/testdir/setup.vim b/src/nvim/testdir/setup.vim deleted file mode 100644 index 25ac2d1239..0000000000 --- a/src/nvim/testdir/setup.vim +++ /dev/null @@ -1,85 +0,0 @@ -if exists('s:did_load') - " Align Nvim defaults to Vim. - set backspace= - set complete=.,w,b,u,t,i - set directory& - set directory^=. - set display= - set fillchars=vert:\|,foldsep:\|,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= - if g:testname !~ 'test_mapping.vim$' - " Make "Q" switch to Ex mode. - " This does not work for all tests. - nnoremap Q gQ - endif -endif - -" Common preparations for running tests. - -" Only load this once. -if exists('s:did_load') - finish -endif -let s:did_load = 1 - -" Clear Nvim default mappings and menus. -mapclear -mapclear! -aunmenu * -tlunmenu * - -" roughly equivalent to test_setmouse() in Vim -func Ntest_setmouse(row, col) - call nvim_input_mouse('move', '', '', 0, a:row - 1, a:col - 1) -endfunc - -" 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 -- cgit