]> granicus.if.org Git - vim/commitdiff
patch 8.1.2068: test for SafeState and SafeStateAgain may fail v8.1.2068
authorBram Moolenaar <Bram@vim.org>
Sun, 22 Sep 2019 21:03:58 +0000 (23:03 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 22 Sep 2019 21:03:58 +0000 (23:03 +0200)
Problem:    Test for SafeState and SafeStateAgain may fail.
Solution:   Accept more possible responses

src/testdir/test_autocmd.vim
src/version.c

index c3d3bbbd102f5ecb72d87898e2989359556be22f..1f901a9ffa6a2805a9d976d288d9784e54c77fb5 100644 (file)
@@ -2242,14 +2242,15 @@ func Test_autocmd_SafeState()
   call writefile(lines, 'XSafeState')
   let buf = RunVimInTerminal('-S XSafeState', #{rows: 6})
 
+  " Sometimes we loop to handle an K_IGNORE
   call term_sendkeys(buf, ":echo g:safe\<CR>")
-  call WaitForAssert({-> assert_match('^2 ', term_getline(buf, 6))}, 1000)
+  call WaitForAssert({-> assert_match('^[12] ', term_getline(buf, 6))}, 1000)
 
   call term_sendkeys(buf, ":echo g:again\<CR>")
   call WaitForAssert({-> assert_match('^xxxx', term_getline(buf, 6))}, 1000)
 
   call term_sendkeys(buf, ":let g:again = ''\<CR>:call CallTimer()\<CR>")
-  call term_wait(buf)
+  call term_wait(buf, 50)
   call term_sendkeys(buf, ":echo g:again\<CR>")
   call WaitForAssert({-> assert_match('xtx', term_getline(buf, 6))}, 1000)
 
index d163fbaa4d9ac530304983d081574e503b14c6a2..678bc13d407dc97ae88a807c65b4c944b08ed70f 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2068,
 /**/
     2067,
 /**/