1
0
forked from aniani/vim

patch 9.0.1228: fuzzy menu completion is only tested in the GUI

Problem:    Fuzzy menu completion is only tested in the GUI.
Solution:   Make fuzzy menu completion test work without GUI.
            (closes #11861)
This commit is contained in:
zeertzjq
2023-01-22 12:41:55 +00:00
committed by Bram Moolenaar
parent a6759381a5
commit 145a6afe3a
2 changed files with 9 additions and 1 deletions

View File

@@ -435,6 +435,7 @@ func Test_getcompletion()
call assert_true(matchcount > 0) call assert_true(matchcount > 0)
let matchcount = len(getcompletion('File.', 'menu')) let matchcount = len(getcompletion('File.', 'menu'))
call assert_true(matchcount > 0) call assert_true(matchcount > 0)
source $VIMRUNTIME/delmenu.vim
endif endif
let l = getcompletion('v:n', 'var') let l = getcompletion('v:n', 'var')
@@ -2914,20 +2915,25 @@ func Test_fuzzy_completion_abbr()
call assert_equal("\"iabbr WaitForCompletion", @:) call assert_equal("\"iabbr WaitForCompletion", @:)
call feedkeys(":iabbr a1z\<Tab>\<C-B>\"\<CR>", 'tx') call feedkeys(":iabbr a1z\<Tab>\<C-B>\"\<CR>", 'tx')
call assert_equal("\"iabbr a1z\t", @:) call assert_equal("\"iabbr a1z\t", @:)
iunabbrev WaitForCompletion iunabbrev WaitForCompletion
set wildoptions& set wildoptions&
endfunc endfunc
" menu name fuzzy completion " menu name fuzzy completion
func Test_fuzzy_completion_menu() func Test_fuzzy_completion_menu()
CheckGui CheckFeature menu
source $VIMRUNTIME/menu.vim
set wildoptions& set wildoptions&
call feedkeys(":menu pup\<Tab>\<C-B>\"\<CR>", 'tx') call feedkeys(":menu pup\<Tab>\<C-B>\"\<CR>", 'tx')
call assert_equal('"menu pup', @:) call assert_equal('"menu pup', @:)
set wildoptions=fuzzy set wildoptions=fuzzy
call feedkeys(":menu pup\<Tab>\<C-B>\"\<CR>", 'tx') call feedkeys(":menu pup\<Tab>\<C-B>\"\<CR>", 'tx')
call assert_equal('"menu PopUp.', @:) call assert_equal('"menu PopUp.', @:)
set wildoptions& set wildoptions&
source $VIMRUNTIME/delmenu.vim
endfunc endfunc
" :messages suboptions fuzzy completion " :messages suboptions fuzzy completion

View File

@@ -695,6 +695,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 */
/**/
1228,
/**/ /**/
1227, 1227,
/**/ /**/