Mercurial > vim
changeset 9462:7384c0cfad13 v7.4.2012
commit https://github.com/vim/vim/commit/0d3e24be5686c0710aa3c6671e4c626d6cb21a5f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 9 19:20:59 2016 +0200
patch 7.4.2012
Problem: Test for getcompletion() does not pass on all systems.
Solution: Only test what is supported.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 09 Jul 2016 19:30:05 +0200 |
parents | 51320e7fa2f8 |
children | 78b611afcadb |
files | src/testdir/test_cmdline.vim src/version.c |
diffstat | 2 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -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