0
0
mirror of https://github.com/vim/vim.git synced 2025-10-08 06:04:08 -04:00

patch 7.4.2012

Problem:    Test for getcompletion() does not pass on all systems.
Solution:   Only test what is supported.
This commit is contained in:
Bram Moolenaar
2016-07-09 19:20:59 +02:00
parent aa4d73235b
commit 0d3e24be56
2 changed files with 14 additions and 5 deletions

View File

@@ -26,17 +26,24 @@ func Test_complete_wildmenu()
endfunc endfunc
func Test_getcompletion() func Test_getcompletion()
if !has('cmdline_compl')
return
endif
let groupcount = len(getcompletion('', 'event')) let groupcount = len(getcompletion('', 'event'))
call assert_true(groupcount > 0) call assert_true(groupcount > 0)
let matchcount = len(getcompletion('File', 'event')) let matchcount = len(getcompletion('File', 'event'))
call assert_true(matchcount > 0) call assert_true(matchcount > 0)
call assert_true(groupcount > matchcount) call assert_true(groupcount > matchcount)
source $VIMRUNTIME/menu.vim if has('menu')
let matchcount = len(getcompletion('', 'menu')) source $VIMRUNTIME/menu.vim
call assert_true(matchcount > 0) let matchcount = len(getcompletion('', 'menu'))
let matchcount = len(getcompletion('ToolBar.', 'menu')) call assert_true(matchcount > 0)
call assert_true(matchcount > 0) call assert_equal(['File.'], getcompletion('File', 'menu'))
call assert_true(matchcount > 0)
let matchcount = len(getcompletion('File.', 'menu'))
call assert_true(matchcount > 0)
endif
call assert_fails('call getcompletion("", "burp")', 'E475:') call assert_fails('call getcompletion("", "burp")', 'E475:')
endfunc endfunc

View File

@@ -758,6 +758,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 */
/**/
2012,
/**/ /**/
2011, 2011,
/**/ /**/