mirror of
https://github.com/neovim/neovim.git
synced 2026-07-16 22:21:30 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user