diff options
| author | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2016-10-01 19:38:34 +0900 |
|---|---|---|
| committer | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2016-10-01 19:54:28 +0900 |
| commit | aeebed8d611b61ca8e4d469d0f3c0405a9d0f369 (patch) | |
| tree | 8ab33ae34a22684d0214e97148990361f4f67341 /src/nvim/testdir | |
| parent | c8b6ec2e6a8599203b4cff762f148f62464d9725 (diff) | |
| download | rneovim-aeebed8d611b61ca8e4d469d0f3c0405a9d0f369.tar.gz rneovim-aeebed8d611b61ca8e4d469d0f3c0405a9d0f369.tar.bz2 rneovim-aeebed8d611b61ca8e4d469d0f3c0405a9d0f369.zip | |
vim-patch:7.4.2158
Problem: Result of getcompletion('', 'cscope') depends on previous
completion. (Christian Brabandt)
Solution: Call set_context_in_cscope_cmd().
https://github.com/vim/vim/commit/b650b9878e9f0ac6bb1b61230095ad9ab3850a33
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_cmdline.vim | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index 902ec1c05d..25a6e7200f 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -121,12 +121,22 @@ func Test_getcompletion() let l = getcompletion('dark', 'highlight') call assert_equal([], l) + if has('cscope') + let l = getcompletion('', 'cscope') + let cmds = ['add', 'find', 'help', 'kill', 'reset', 'show'] + call assert_equal(cmds, l) + " using cmdline completion must not change the result + call feedkeys(":cscope find \<c-d>\<c-c>", 'xt') + let l = getcompletion('', 'cscope') + call assert_equal(cmds, l) + let keys = ['a', 'c', 'd', 'e', 'f', 'g', 'i', 's', 't'] + let l = getcompletion('find ', 'cscope') + call assert_equal(keys, l) + endif + " For others test if the name is recognized. let names = ['buffer', 'environment', 'file_in_path', \ 'mapping', 'shellcmd', 'tag', 'tag_listfiles', 'user'] - if has('cscope') - call add(names, 'cscope') - endif if has('cmdline_hist') call add(names, 'history') endif |