From 9fe472c91b7f05be3ab5f5e0a459e303fa0eacc7 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 17 Nov 2018 08:18:01 -0500 Subject: 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) https://github.com/vim/vim/commit/af559d2c9f44bc88a7d94f9236b3c024563a8e73 --- src/nvim/testdir/test_ins_complete.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/nvim/testdir/test_ins_complete.vim b/src/nvim/testdir/test_ins_complete.vim index 5ff63e58ba..d3429617d0 100644 --- a/src/nvim/testdir/test_ins_complete.vim +++ b/src/nvim/testdir/test_ins_complete.vim @@ -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\\\\", "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 -- cgit