summaryrefslogtreecommitdiff
path: root/src/testdir/test_cmdline.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-01-22 19:25:33 +0100
committerBram Moolenaar <Bram@vim.org>2017-01-22 19:25:33 +0100
commit15eedf1d621d980cb40f50cc6a78a09ab94388c7 (patch)
treed78a8504575069b3588f38359d83d80d1d8a79fa /src/testdir/test_cmdline.vim
parent7a40ea2138102545848ea86a361f1b8dec7552b5 (diff)
downloadvim-git-15eedf1d621d980cb40f50cc6a78a09ab94388c7.tar.gz
patch 8.0.0220: completion of highlight names misses a few valuesv8.0.0220
Problem: Completion for :match does not show "none" and other missing highlight names. Solution: Skip over cleared entries before checking the index to be at the end.
Diffstat (limited to 'src/testdir/test_cmdline.vim')
-rw-r--r--src/testdir/test_cmdline.vim28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index abeb609ea..279a1681c 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -25,8 +25,34 @@ func Test_complete_wildmenu()
set nowildmenu
endfunc
+func Test_match_completion()
+ if !has('cmdline_compl')
+ return
+ endif
+ hi Aardig ctermfg=green
+ call feedkeys(":match \<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"match Aardig', getreg(':'))
+ call feedkeys(":match \<S-Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"match none', getreg(':'))
+endfunc
+
+func Test_highlight_completion()
+ if !has('cmdline_compl')
+ return
+ endif
+ hi Aardig ctermfg=green
+ call feedkeys(":hi \<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"hi Aardig', getreg(':'))
+ call feedkeys(":hi li\<S-Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"hi link', getreg(':'))
+ call feedkeys(":hi d\<S-Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"hi default', getreg(':'))
+ call feedkeys(":hi c\<S-Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"hi clear', getreg(':'))
+endfunc
+
func Test_expr_completion()
- if !(has('cmdline_compl') && has('eval'))
+ if !has('cmdline_compl')
return
endif
for cmd in [