summaryrefslogtreecommitdiff
path: root/src/testdir/test_cmdline.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-08-06 14:12:50 +0200
committerBram Moolenaar <Bram@vim.org>2016-08-06 14:12:50 +0200
commit7522f6982197f83a5c0f6e9af07fb713934f824a (patch)
tree83081f448c1fa8a0730e5f0ae8d31a13d9582cdf /src/testdir/test_cmdline.vim
parent7ab6defcafe017a3ad58580a3e56dab705b1ed8b (diff)
downloadvim-git-7522f6982197f83a5c0f6e9af07fb713934f824a.tar.gz
patch 7.4.2162v7.4.2162
Problem: Result of getcompletion('', 'sign') depends on previous completion. Solution: Call set_context_in_sign_cmd(). (Dominique Pelle)
Diffstat (limited to 'src/testdir/test_cmdline.vim')
-rw-r--r--src/testdir/test_cmdline.vim16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index 12194cd96..e2c187693 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -138,6 +138,19 @@ func Test_getcompletion()
call assert_equal(keys, l)
endif
+ if has('signs')
+ sign define Testing linehl=Comment
+ let l = getcompletion('', 'sign')
+ let cmds = ['define', 'jump', 'list', 'place', 'undefine', 'unplace']
+ call assert_equal(cmds, l)
+ " using cmdline completion must not change the result
+ call feedkeys(":sign list \<c-d>\<c-c>", 'xt')
+ let l = getcompletion('', 'sign')
+ call assert_equal(cmds, l)
+ let l = getcompletion('list ', 'sign')
+ call assert_equal(['Testing'], l)
+ endif
+
" For others test if the name is recognized.
let names = ['buffer', 'environment', 'file_in_path',
\ 'mapping', 'shellcmd', 'tag', 'tag_listfiles', 'user']
@@ -150,9 +163,6 @@ func Test_getcompletion()
if has('profile')
call add(names, 'syntime')
endif
- if has('signs')
- call add(names, 'sign')
- endif
set tags=Xtags
call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//", "word\tfile\tcmd"], 'Xtags')