mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.1.1252: not all mapping completion is tested
Problem: Not all mapping completion is tested. Solution: Add a few more mapping completion tests.
This commit is contained in:
@@ -78,19 +78,31 @@ func Test_map_completion()
|
|||||||
call feedkeys(":map <silent> <sp\<Tab>\<Home>\"\<CR>", 'xt')
|
call feedkeys(":map <silent> <sp\<Tab>\<Home>\"\<CR>", 'xt')
|
||||||
call assert_equal('"map <silent> <special>', getreg(':'))
|
call assert_equal('"map <silent> <special>', getreg(':'))
|
||||||
|
|
||||||
|
map <Middle>x middle
|
||||||
|
|
||||||
map ,f commaf
|
map ,f commaf
|
||||||
map ,g commaf
|
map ,g commaf
|
||||||
|
map <Left> left
|
||||||
|
map <A-Left>x shiftleft
|
||||||
call feedkeys(":map ,\<Tab>\<Home>\"\<CR>", 'xt')
|
call feedkeys(":map ,\<Tab>\<Home>\"\<CR>", 'xt')
|
||||||
call assert_equal('"map ,f', getreg(':'))
|
call assert_equal('"map ,f', getreg(':'))
|
||||||
call feedkeys(":map ,\<Tab>\<Tab>\<Home>\"\<CR>", 'xt')
|
call feedkeys(":map ,\<Tab>\<Tab>\<Home>\"\<CR>", 'xt')
|
||||||
call assert_equal('"map ,g', getreg(':'))
|
call assert_equal('"map ,g', getreg(':'))
|
||||||
|
call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
|
||||||
|
call assert_equal('"map <Left>', getreg(':'))
|
||||||
|
call feedkeys(":map <A-Left>\<Tab>\<Home>\"\<CR>", 'xt')
|
||||||
|
call assert_equal('"map <A-Left>x', getreg(':'))
|
||||||
unmap ,f
|
unmap ,f
|
||||||
unmap ,g
|
unmap ,g
|
||||||
|
unmap <Left>
|
||||||
|
unmap <A-Left>x
|
||||||
|
|
||||||
set cpo-=< cpo-=B cpo-=k
|
set cpo-=< cpo-=B cpo-=k
|
||||||
map <Left> left
|
map <Left> left
|
||||||
call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
|
call feedkeys(":map <L\<Tab>\<Home>\"\<CR>", 'xt')
|
||||||
call assert_equal('"map <Left>', getreg(':'))
|
call assert_equal('"map <Left>', getreg(':'))
|
||||||
|
call feedkeys(":map <M\<Tab>\<Home>\"\<CR>", 'xt')
|
||||||
|
call assert_equal('"map <M', getreg(':'))
|
||||||
unmap <Left>
|
unmap <Left>
|
||||||
|
|
||||||
set cpo+=<
|
set cpo+=<
|
||||||
@@ -113,6 +125,9 @@ func Test_map_completion()
|
|||||||
call assert_equal('"map <Left>', getreg(':'))
|
call assert_equal('"map <Left>', getreg(':'))
|
||||||
unmap <Left>
|
unmap <Left>
|
||||||
set cpo-=k
|
set cpo-=k
|
||||||
|
|
||||||
|
unmap <Middle>x
|
||||||
|
set cpo&vim
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_match_completion()
|
func Test_match_completion()
|
||||||
|
@@ -767,6 +767,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1252,
|
||||||
/**/
|
/**/
|
||||||
1251,
|
1251,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user