diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-01-22 16:46:56 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-01-22 16:46:56 +0100 |
commit | 2b2207ba69c6b009e466a36eef0644ca723e16d3 (patch) | |
tree | 4ad19516d7a232d12921ab9d3be50ce49326345c /src/testdir | |
parent | e2d74dbe19c0980c72725a7d0c2b668d6f41766e (diff) | |
download | vim-2b2207ba69c6b009e466a36eef0644ca723e16d3.zip |
patch 8.0.0218: no completion for :cexpr and similar commands
Problem: No command line completion for :cexpr, :cgetexpr, :caddexpr, etc.
Solution: Make completion work. (Yegappan Lakshmanan) Add a test.
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_cmdline.vim | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index 96fee0b1c..abeb609ea 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/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 |