summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-11-17 19:48:18 +0100
committerBram Moolenaar <Bram@vim.org>2016-11-17 19:48:18 +0100
commit9f0e423c2818c0cacd0810f9c3c67cbb6b80963d (patch)
treecb99ed0028cd28cc1e0ea4c9f7a05a684360c631
parent6c896867c4f5d759616028ef7cbfce2a9ed32600 (diff)
patch 8.0.0091v8.0.0091
Problem: Test_help_complete sometimes fails in MS-Windows console. Solution: Use getcompletion() instead of feedkeys() and command line completion. (Hirohito Higashi)
-rw-r--r--src/testdir/test_help_tagjump.vim57
-rw-r--r--src/version.c2
2 files changed, 26 insertions, 33 deletions
diff --git a/src/testdir/test_help_tagjump.vim b/src/testdir/test_help_tagjump.vim
index 778bd9c71f..d11a1fafbd 100644
--- a/src/testdir/test_help_tagjump.vim
+++ b/src/testdir/test_help_tagjump.vim
@@ -77,17 +77,8 @@ func s:doc_config_teardown()
endif
endfunc
-func s:get_cmd_compl_list(cmd)
- let list = []
- let str = ''
- for cnt in range(1, 999)
- call feedkeys(a:cmd . repeat("\<Tab>", cnt) . "'\<C-B>let str='\<CR>", 'tx')
- if str ==# a:cmd[1:]
- break
- endif
- call add(list, str)
- endfor
- return list
+func s:get_help_compl_list(cmd)
+ return getcompletion(a:cmd, 'help')
endfunc
func Test_help_complete()
@@ -99,49 +90,49 @@ func Test_help_complete()
if has('multi_lang')
set helplang=
endif
- let list = s:get_cmd_compl_list(":h test")
- call assert_equal(['h test-col', 'h test-char'], list)
+ let list = s:get_help_compl_list("test")
+ call assert_equal(['test-col', 'test-char'], list)
if has('multi_lang')
" 'helplang=ab' and help file lang is 'en'
set helplang=ab
- let list = s:get_cmd_compl_list(":h test")
- call assert_equal(['h test-col', 'h test-char'], list)
+ let list = s:get_help_compl_list("test")
+ call assert_equal(['test-col', 'test-char'], list)
" 'helplang=' and help file lang is 'en' and 'ab'
set rtp+=Xdir1/doc-ab
set helplang=
- let list = s:get_cmd_compl_list(":h test")
- call assert_equal(sort(['h test-col@en', 'h test-col@ab',
- \ 'h test-char@en', 'h test-char@ab']), sort(list))
+ let list = s:get_help_compl_list("test")
+ call assert_equal(sort(['test-col@en', 'test-col@ab',
+ \ 'test-char@en', 'test-char@ab']), sort(list))
" 'helplang=ab' and help file lang is 'en' and 'ab'
set helplang=ab
- let list = s:get_cmd_compl_list(":h test")
- call assert_equal(sort(['h test-col', 'h test-col@en',
- \ 'h test-char', 'h test-char@en']), sort(list))
+ let list = s:get_help_compl_list("test")
+ call assert_equal(sort(['test-col', 'test-col@en',
+ \ 'test-char', 'test-char@en']), sort(list))
" 'helplang=' and help file lang is 'en', 'ab' and 'ja'
set rtp+=Xdir1/doc-ja
set helplang=
- let list = s:get_cmd_compl_list(":h test")
- call assert_equal(sort(['h test-col@en', 'h test-col@ab',
- \ 'h test-col@ja', 'h test-char@en',
- \ 'h test-char@ab', 'h test-char@ja']), sort(list))
+ let list = s:get_help_compl_list("test")
+ call assert_equal(sort(['test-col@en', 'test-col@ab',
+ \ 'test-col@ja', 'test-char@en',
+ \ 'test-char@ab', 'test-char@ja']), sort(list))
" 'helplang=ab' and help file lang is 'en', 'ab' and 'ja'
set helplang=ab
- let list = s:get_cmd_compl_list(":h test")
- call assert_equal(sort(['h test-col', 'h test-col@en',
- \ 'h test-col@ja', 'h test-char',
- \ 'h test-char@en', 'h test-char@ja']), sort(list))
+ let list = s:get_help_compl_list("test")
+ call assert_equal(sort(['test-col', 'test-col@en',
+ \ 'test-col@ja', 'test-char',
+ \ 'test-char@en', 'test-char@ja']), sort(list))
" 'helplang=ab,ja' and help file lang is 'en', 'ab' and 'ja'
set helplang=ab,ja
- let list = s:get_cmd_compl_list(":h test")
- call assert_equal(sort(['h test-col', 'h test-col@ja',
- \ 'h test-col@en', 'h test-char',
- \ 'h test-char@ja', 'h test-char@en']), sort(list))
+ let list = s:get_help_compl_list("test")
+ call assert_equal(sort(['test-col', 'test-col@ja',
+ \ 'test-col@en', 'test-char',
+ \ 'test-char@ja', 'test-char@en']), sort(list))
endif
catch
call assert_exception('X')
diff --git a/src/version.c b/src/version.c
index d00ebd465f..f07437de95 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 91,
+/**/
90,
/**/
89,