comparison src/testdir/test_cmdline.vim @ 9766:be9b5f8c3fd9 v7.4.2158

commit https://github.com/vim/vim/commit/b650b9878e9f0ac6bb1b61230095ad9ab3850a33 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 5 20:35:13 2016 +0200 patch 7.4.2158 Problem: Result of getcompletion('', 'cscope') depends on previous completion. (Christian Brabandt) Solution: Call set_context_in_cscope_cmd().
author Christian Brabandt <cb@256bit.org>
date Fri, 05 Aug 2016 20:45:06 +0200
parents 6255ff1ea003
children 5385e72e1ac2
comparison
equal deleted inserted replaced
9765:d2fe50232d72 9766:be9b5f8c3fd9
123 let l = getcompletion('er', 'highlight') 123 let l = getcompletion('er', 'highlight')
124 call assert_true(index(l, 'ErrorMsg') >= 0) 124 call assert_true(index(l, 'ErrorMsg') >= 0)
125 let l = getcompletion('dark', 'highlight') 125 let l = getcompletion('dark', 'highlight')
126 call assert_equal([], l) 126 call assert_equal([], l)
127 127
128 if has('cscope')
129 let l = getcompletion('', 'cscope')
130 let cmds = ['add', 'find', 'help', 'kill', 'reset', 'show']
131 call assert_equal(cmds, l)
132 " using cmdline completion must not change the result
133 call feedkeys(":cscope find \<c-d>\<c-c>", 'xt')
134 let l = getcompletion('', 'cscope')
135 call assert_equal(cmds, l)
136 let keys = ['a', 'c', 'd', 'e', 'f', 'g', 'i', 's', 't']
137 let l = getcompletion('find ', 'cscope')
138 call assert_equal(keys, l)
139 endif
140
128 " For others test if the name is recognized. 141 " For others test if the name is recognized.
129 let names = ['buffer', 'environment', 'file_in_path', 142 let names = ['buffer', 'environment', 'file_in_path',
130 \ 'mapping', 'shellcmd', 'tag', 'tag_listfiles', 'user'] 143 \ 'mapping', 'shellcmd', 'tag', 'tag_listfiles', 'user']
131 if has('cscope')
132 call add(names, 'cscope')
133 endif
134 if has('cmdline_hist') 144 if has('cmdline_hist')
135 call add(names, 'history') 145 call add(names, 'history')
136 endif 146 endif
137 if has('gettext') 147 if has('gettext')
138 call add(names, 'locale') 148 call add(names, 'locale')