vim-patch:8.1.0258: not enough testing for the CompleteDone event

Problem:    Not enough testing for the CompleteDone event.
Solution:   Add a test. (closes vim/vim#3297)
af559d2c9f
This commit is contained in:
Jan Edmund Lazo
2018-11-17 08:18:01 -05:00
parent 25356f2802
commit 9fe472c91b

View File

@@ -142,6 +142,19 @@ function Test_CompleteDoneDict()
au! CompleteDone
endfunc
func Test_CompleteDone_undo()
au CompleteDone * call append(0, "prepend1")
new
call setline(1, ["line1", "line2"])
call feedkeys("Go\<C-X>\<C-N>\<CR>\<ESC>", "tx")
call assert_equal(["prepend1", "line1", "line2", "line1", ""],
\ getline(1, '$'))
undo
call assert_equal(["line1", "line2"], getline(1, '$'))
bwipe!
au! CompleteDone
endfunc
function! s:CompleteDone_CompleteFuncDictNoUserData( findstart, base )
if a:findstart
return 0