]> granicus.if.org Git - vim/commitdiff
patch 8.1.0258: not enough testing for the CompleteDone event v8.1.0258
authorBram Moolenaar <Bram@vim.org>
Wed, 8 Aug 2018 20:55:41 +0000 (22:55 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 8 Aug 2018 20:55:41 +0000 (22:55 +0200)
Problem:    Not enough testing for the CompleteDone event.
Solution:   Add a test. (closes #3297)

src/testdir/test_ins_complete.vim
src/version.c

index 2cd29b5757abd3c32c5367e1090fb23be51189a3..f7e1590efce54ae1fcdd632c7e564f4e9ee863c0 100644 (file)
@@ -262,6 +262,19 @@ function Test_CompleteDoneList()
   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
+
 " Check that when using feedkeys() typeahead does not interrupt searching for
 " completions.
 func Test_compl_feedkeys()
index 36376e9e5df986bfe377539111809db77b76eabf..4f31d66e8758d72784fc8c1673e1c765e17786b3 100644 (file)
@@ -794,6 +794,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    258,
 /**/
     257,
 /**/