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:
@@ -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
|
||||||
|
@@ -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,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user