summaryrefslogtreecommitdiff
path: root/src/testdir/test_popup.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_popup.vim')
-rw-r--r--src/testdir/test_popup.vim32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index c69c3b00c..a8416788a 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -276,6 +276,38 @@ func Test_noinsert_complete()
iunmap <F5>
endfunc
+func Test_complete_no_filter()
+ func! s:complTest1() abort
+ call complete(1, [{'word': 'foobar'}])
+ return ''
+ endfunc
+ func! s:complTest2() abort
+ call complete(1, [{'word': 'foobar', 'equal': 1}])
+ return ''
+ endfunc
+
+ let completeopt = &completeopt
+
+ " without equal=1
+ new
+ set completeopt=menuone,noinsert,menu
+ inoremap <F5> <C-R>=s:complTest1()<CR>
+ call feedkeys("i\<F5>z\<CR>\<CR>\<ESC>.", 'tx')
+ call assert_equal('z', getline(1))
+ bwipe!
+
+ " with equal=1
+ new
+ set completeopt=menuone,noinsert,menu
+ inoremap <F5> <C-R>=s:complTest2()<CR>
+ call feedkeys("i\<F5>z\<CR>\<CR>\<ESC>.", 'tx')
+ call assert_equal('foobar', getline(1))
+ bwipe!
+
+ let &completeopt = completeopt
+ iunmap <F5>
+endfunc
+
func Test_compl_vim_cmds_after_register_expr()
func! s:test_func()
return 'autocmd '