mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
vim-patch:9.0.0059: test file has wrong name
Problem: Test file has wrong name.
Solution: Rename the file. Various small fixes. (closes vim/vim#10674)
bb404f5ad5
This commit is contained in:
@@ -1808,7 +1808,7 @@ static int handle_mapping(int *keylenp, bool *timedout, int *mapdepth)
|
||||
int local_State = get_real_state();
|
||||
bool is_plug_map = false;
|
||||
|
||||
// If typehead starts with <Plug> then remap, even for a "noremap" mapping.
|
||||
// If typeahead starts with <Plug> then remap, even for a "noremap" mapping.
|
||||
if (typebuf.tb_len >= 3
|
||||
&& typebuf.tb_buf[typebuf.tb_off] == K_SPECIAL
|
||||
&& typebuf.tb_buf[typebuf.tb_off + 1] == KS_EXTRA
|
||||
|
@@ -10,7 +10,6 @@ source test_ex_z.vim
|
||||
source test_ex_mode.vim
|
||||
source test_expand.vim
|
||||
source test_expand_func.vim
|
||||
source test_feedkeys.vim
|
||||
source test_file_perm.vim
|
||||
source test_fnamemodify.vim
|
||||
source test_ga.vim
|
||||
|
@@ -1,4 +1,4 @@
|
||||
" Test feedkeys() function.
|
||||
" Tests for character input and feedkeys() function.
|
||||
|
||||
func Test_feedkeys_x_with_empty_string()
|
||||
new
|
||||
@@ -34,4 +34,28 @@ func Test_feedkeys_escape_special()
|
||||
nunmap …
|
||||
endfunc
|
||||
|
||||
func Test_input_simplify_ctrl_at()
|
||||
new
|
||||
" feeding unsimplified CTRL-@ should still trigger i_CTRL-@
|
||||
call feedkeys("ifoo\<Esc>A\<*C-@>x", 'xt')
|
||||
call assert_equal('foofo', getline(1))
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func Test_input_simplify_noremap()
|
||||
call feedkeys("i\<*C-M>", 'nx')
|
||||
call assert_equal('', getline(1))
|
||||
call assert_equal([0, 2, 1, 0, 1], getcurpos())
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func Test_input_simplify_timedout()
|
||||
inoremap <C-M>a b
|
||||
call feedkeys("i\<*C-M>", 'xt')
|
||||
call assert_equal('', getline(1))
|
||||
call assert_equal([0, 2, 1, 0, 1], getcurpos())
|
||||
iunmap <C-M>a
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
@@ -49,7 +49,9 @@ func Test_pastetoggle()
|
||||
let &pastetoggle = str
|
||||
call assert_equal(str, &pastetoggle)
|
||||
call assert_equal("\n pastetoggle=" .. strtrans(str), execute('set pastetoggle?'))
|
||||
|
||||
unlet str
|
||||
set pastetoggle&
|
||||
endfunc
|
||||
|
||||
func Test_wildchar()
|
||||
@@ -783,7 +785,6 @@ endfunc
|
||||
func Test_rightleftcmd()
|
||||
CheckFeature rightleft
|
||||
set rightleft
|
||||
set rightleftcmd
|
||||
|
||||
let g:l = []
|
||||
func AddPos()
|
||||
@@ -792,6 +793,13 @@ func Test_rightleftcmd()
|
||||
endfunc
|
||||
cmap <expr> <F2> AddPos()
|
||||
|
||||
set rightleftcmd=
|
||||
call feedkeys("/\<F2>abc\<Right>\<F2>\<Left>\<Left>\<F2>" ..
|
||||
\ "\<Right>\<F2>\<Esc>", 'xt')
|
||||
call assert_equal([2, 5, 3, 4], g:l)
|
||||
|
||||
let g:l = []
|
||||
set rightleftcmd=search
|
||||
call feedkeys("/\<F2>abc\<Left>\<F2>\<Right>\<Right>\<F2>" ..
|
||||
\ "\<Left>\<F2>\<Esc>", 'xt')
|
||||
call assert_equal([&co - 1, &co - 4, &co - 2, &co - 3], g:l)
|
||||
|
@@ -11,6 +11,10 @@ func SetUp()
|
||||
set laststatus=2
|
||||
endfunc
|
||||
|
||||
func TearDown()
|
||||
set laststatus&
|
||||
endfunc
|
||||
|
||||
func s:get_statusline()
|
||||
return ScreenLines(&lines - 1, &columns)[0]
|
||||
endfunc
|
||||
@@ -39,7 +43,6 @@ endfunc
|
||||
|
||||
func Test_caught_error_in_statusline()
|
||||
let s:func_in_statusline_called = 0
|
||||
set laststatus=2
|
||||
let statusline = '%{StatuslineWithCaughtError()}'
|
||||
let &statusline = statusline
|
||||
redrawstatus
|
||||
@@ -50,7 +53,6 @@ endfunc
|
||||
|
||||
func Test_statusline_will_be_disabled_with_error()
|
||||
let s:func_in_statusline_called = 0
|
||||
set laststatus=2
|
||||
let statusline = '%{StatuslineWithError()}'
|
||||
try
|
||||
let &statusline = statusline
|
||||
@@ -77,7 +79,6 @@ func Test_statusline()
|
||||
call assert_match('^ ((2) of 2)\s*$', s:get_statusline())
|
||||
|
||||
only
|
||||
set laststatus=2
|
||||
set splitbelow
|
||||
call setline(1, range(1, 10000))
|
||||
|
||||
@@ -436,7 +437,6 @@ func Test_statusline()
|
||||
%bw!
|
||||
call delete('Xstatusline')
|
||||
set statusline&
|
||||
set laststatus&
|
||||
set splitbelow&
|
||||
endfunc
|
||||
|
||||
@@ -524,7 +524,6 @@ endfunc
|
||||
" with a custom 'statusline'
|
||||
func Test_statusline_mbyte_fillchar()
|
||||
only
|
||||
set laststatus=2
|
||||
set fillchars=vert:\|,fold:-,stl:━,stlnc:═
|
||||
set statusline=a%=b
|
||||
call assert_match('^a\+━\+b$', s:get_statusline())
|
||||
@@ -532,7 +531,7 @@ func Test_statusline_mbyte_fillchar()
|
||||
call assert_match('^a\+━\+b━a\+═\+b$', s:get_statusline())
|
||||
wincmd w
|
||||
call assert_match('^a\+═\+b═a\+━\+b$', s:get_statusline())
|
||||
set statusline& fillchars& laststatus&
|
||||
set statusline& fillchars&
|
||||
%bw!
|
||||
endfunc
|
||||
|
||||
|
@@ -33,28 +33,5 @@ func Test_special_term_keycodes()
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func Test_simplify_ctrl_at()
|
||||
" feeding unsimplified CTRL-@ should still trigger i_CTRL-@
|
||||
call feedkeys("ifoo\<Esc>A\<*C-@>x", 'xt')
|
||||
call assert_equal('foofo', getline(1))
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func Test_simplify_noremap()
|
||||
call feedkeys("i\<*C-M>", 'nx')
|
||||
call assert_equal('', getline(1))
|
||||
call assert_equal([0, 2, 1, 0, 1], getcurpos())
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func Test_simplify_timedout()
|
||||
inoremap <C-M>a b
|
||||
call feedkeys("i\<*C-M>", 'xt')
|
||||
call assert_equal('', getline(1))
|
||||
call assert_equal([0, 2, 1, 0, 1], getcurpos())
|
||||
iunmap <C-M>a
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
@@ -337,7 +337,7 @@ endfunc
|
||||
|
||||
" Test that the garbage collector isn't triggered if a timer callback invokes
|
||||
" vgetc().
|
||||
func Test_timer_nocatch_garbage_collect()
|
||||
func Test_nocatch_timer_garbage_collect()
|
||||
" skipped: Nvim does not support test_garbagecollect_soon(), test_override()
|
||||
return
|
||||
" 'uptimetime. must be bigger than the timer timeout
|
||||
|
Reference in New Issue
Block a user