Mercurial > vim
comparison src/testdir/test_cmdline.vim @ 10656:4762bd300564 v8.0.0218
patch 8.0.0218: no completion for :cexpr and similar commands
commit https://github.com/vim/vim/commit/2b2207ba69c6b009e466a36eef0644ca723e16d3
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 22 16:46:56 2017 +0100
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 22 Jan 2017 17:00:05 +0100 |
parents | dc9326b58c33 |
children | 715836a72361 |
comparison
equal
deleted
inserted
replaced
10655:315b26bc3d66 | 10656:4762bd300564 |
---|---|
21 call assert_equal('testfile2', getline(1)) | 21 call assert_equal('testfile2', getline(1)) |
22 | 22 |
23 call delete('Xtestfile1') | 23 call delete('Xtestfile1') |
24 call delete('Xtestfile2') | 24 call delete('Xtestfile2') |
25 set nowildmenu | 25 set nowildmenu |
26 endfunc | |
27 | |
28 func Test_expr_completion() | |
29 if !(has('cmdline_compl') && has('eval')) | |
30 return | |
31 endif | |
32 for cmd in [ | |
33 \ 'let a = ', | |
34 \ 'if', | |
35 \ 'elseif', | |
36 \ 'while', | |
37 \ 'for', | |
38 \ 'echo', | |
39 \ 'echon', | |
40 \ 'execute', | |
41 \ 'echomsg', | |
42 \ 'echoerr', | |
43 \ 'call', | |
44 \ 'return', | |
45 \ 'cexpr', | |
46 \ 'caddexpr', | |
47 \ 'cgetexpr', | |
48 \ 'lexpr', | |
49 \ 'laddexpr', | |
50 \ 'lgetexpr'] | |
51 call feedkeys(":" . cmd . " getl\<Tab>\<Home>\"\<CR>", 'xt') | |
52 call assert_equal('"' . cmd . ' getline(', getreg(':')) | |
53 endfor | |
26 endfunc | 54 endfunc |
27 | 55 |
28 func Test_getcompletion() | 56 func Test_getcompletion() |
29 if !has('cmdline_compl') | 57 if !has('cmdline_compl') |
30 return | 58 return |