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:
parent
aa4d73235b
commit
0d3e24be56
@ -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
|
||||
|
@ -758,6 +758,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
2012,
|
||||
/**/
|
||||
2011,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user