diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-08-05 20:35:13 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-08-05 20:35:13 +0200 |
commit | b650b9878e9f0ac6bb1b61230095ad9ab3850a33 (patch) | |
tree | 90c76f7e825d472ea6c38b30cbaf8d61126f684d /src/testdir | |
parent | 46c4d4ac66aa2b129f4dcec9debfda606f72d4b3 (diff) | |
download | vim-b650b9878e9f0ac6bb1b61230095ad9ab3850a33.zip |
patch 7.4.2158
Problem: Result of getcompletion('', 'cscope') depends on previous
completion. (Christian Brabandt)
Solution: Call set_context_in_cscope_cmd().
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_cmdline.vim | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index c6d416f1e..12194cd96 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -125,12 +125,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 |