To: vim_dev@googlegroups.com Subject: Patch 7.4.2012 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2012 (after 7.4.2011) Problem: Test for getcompletion() does not pass on all systems. Solution: Only test what is supported. Files: src/testdir/test_cmdline.vim *** ../vim-7.4.2011/src/testdir/test_cmdline.vim 2016-07-09 18:49:47.202419946 +0200 --- src/testdir/test_cmdline.vim 2016-07-09 19:19:30.303908897 +0200 *************** *** 26,42 **** endfunc func Test_getcompletion() 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) call assert_fails('call getcompletion("", "burp")', 'E475:') endfunc --- 26,49 ---- 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) ! 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 *** ../vim-7.4.2011/src/version.c 2016-07-09 18:49:47.202419946 +0200 --- src/version.c 2016-07-09 19:20:43.110827758 +0200 *************** *** 760,761 **** --- 760,763 ---- { /* Add new patch number below this line */ + /**/ + 2012, /**/ -- hundred-and-one symptoms of being an internet addict: 246. You use up your free 1 Gbyte in two days. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///