]> granicus.if.org Git - vim/commitdiff
patch 8.2.0310: autocmd test fails on a slow system v8.2.0310
authorBram Moolenaar <Bram@vim.org>
Sun, 23 Feb 2020 15:16:26 +0000 (16:16 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 23 Feb 2020 15:16:26 +0000 (16:16 +0100)
Problem:    Autocmd test fails on a slow system.
Solution:   Adjust the expectations. (James McCoy, closes #5685)

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

index 2ff231d3668bc1107653f93756e0e3b90d837fe3..8a1d5d835bcb1897d48f08a37572bd9238d2560e 100644 (file)
@@ -2245,17 +2245,19 @@ func Test_autocmd_SafeState()
   call writefile(lines, 'XSafeState')
   let buf = RunVimInTerminal('-S XSafeState', #{rows: 6})
 
-  " Sometimes we loop to handle an K_IGNORE
+  " Sometimes we loop to handle a K_IGNORE, SafeState may be trigered once or
+  " more often.
   call term_sendkeys(buf, ":echo g:safe\<CR>")
-  call WaitForAssert({-> assert_match('^[12] ', term_getline(buf, 6))}, 1000)
+  call WaitForAssert({-> assert_match('^\d ', term_getline(buf, 6))}, 1000)
 
+  " SafeStateAgain should be invoked at least three times
   call term_sendkeys(buf, ":echo g:again\<CR>")
-  call WaitForAssert({-> assert_match('^xxxx', term_getline(buf, 6))}, 1000)
+  call WaitForAssert({-> assert_match('^xxx', term_getline(buf, 6))}, 1000)
 
   call term_sendkeys(buf, ":let g:again = ''\<CR>:call CallTimer()\<CR>")
-  call term_wait(buf, 50)
+  call term_wait(buf, 100)
   call term_sendkeys(buf, ":\<CR>")
-  call term_wait(buf, 50)
+  call term_wait(buf, 100)
   call term_sendkeys(buf, ":echo g:again\<CR>")
   call WaitForAssert({-> assert_match('xtx', term_getline(buf, 6))}, 1000)
 
index b8e47fc56e254925c8d192f02897fd1cae2ba775..61ee30c929f790cc6a7f91068cd081c1873ce597 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    310,
 /**/
     309,
 /**/