aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_cmdline.vim
diff options
context:
space:
mode:
authorKunMing Xie <qqzz014@gmail.com>2017-11-11 06:35:55 +0800
committerJustin M. Keyes <justinkz@gmail.com>2017-11-10 23:35:55 +0100
commitfaa15c5b83d409489c5147ad99e2c44adb3eb37c (patch)
tree709f8b83c861250995e8043f7ffbb1f0a018d459 /src/nvim/testdir/test_cmdline.vim
parentf5d4da0144c97ba13f530ea7dbd50f7b9768cb34 (diff)
downloadrneovim-faa15c5b83d409489c5147ad99e2c44adb3eb37c.tar.gz
rneovim-faa15c5b83d409489c5147ad99e2c44adb3eb37c.tar.bz2
rneovim-faa15c5b83d409489c5147ad99e2c44adb3eb37c.zip
vim-patch:8.0.0218 (#7529)
Problem: No command line completion for :cexpr, :cgetexpr, :caddexpr, etc. Solution: Make completion work. (Yegappan Lakshmanan) Add a test. https://github.com/vim/vim/commit/2b2207ba69c6b009e466a36eef0644ca723e16d3
Diffstat (limited to 'src/nvim/testdir/test_cmdline.vim')
-rw-r--r--src/nvim/testdir/test_cmdline.vim28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim
index c0f04f4730..5abff1838d 100644
--- a/src/nvim/testdir/test_cmdline.vim
+++ b/src/nvim/testdir/test_cmdline.vim
@@ -25,6 +25,34 @@ func Test_complete_wildmenu()
set nowildmenu
endfunc
+func Test_expr_completion()
+ if !(has('cmdline_compl') && has('eval'))
+ return
+ endif
+ for cmd in [
+ \ 'let a = ',
+ \ 'if',
+ \ 'elseif',
+ \ 'while',
+ \ 'for',
+ \ 'echo',
+ \ 'echon',
+ \ 'execute',
+ \ 'echomsg',
+ \ 'echoerr',
+ \ 'call',
+ \ 'return',
+ \ 'cexpr',
+ \ 'caddexpr',
+ \ 'cgetexpr',
+ \ 'lexpr',
+ \ 'laddexpr',
+ \ 'lgetexpr']
+ call feedkeys(":" . cmd . " getl\<Tab>\<Home>\"\<CR>", 'xt')
+ call assert_equal('"' . cmd . ' getline(', getreg(':'))
+ endfor
+endfunc
+
func Test_getcompletion()
if !has('cmdline_compl')
return