0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -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
func Test_getcompletion()
if !has('cmdline_compl')
return
endif
let groupcount = len(getcompletion('', 'event'))
call assert_true(groupcount > 0)
let matchcount = len(getcompletion('File', 'event'))
call assert_true(matchcount > 0)
call assert_true(groupcount > matchcount)
source $VIMRUNTIME/menu.vim
let matchcount = len(getcompletion('', 'menu'))
call assert_true(matchcount > 0)
let matchcount = len(getcompletion('ToolBar.', 'menu'))
call assert_true(matchcount > 0)
if has('menu')
source $VIMRUNTIME/menu.vim
let matchcount = len(getcompletion('', 'menu'))
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:')
endfunc

View File

@ -758,6 +758,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2012,
/**/
2011,
/**/