comparison src/testdir/test_autocmd.vim @ 18146:591db862249a v8.1.2068

patch 8.1.2068: test for SafeState and SafeStateAgain may fail Commit: https://github.com/vim/vim/commit/513537bfff59b94a26c63ab2bd458f21d4be774e Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 22 23:03:58 2019 +0200 patch 8.1.2068: test for SafeState and SafeStateAgain may fail Problem: Test for SafeState and SafeStateAgain may fail. Solution: Accept more possible responses
author Bram Moolenaar <Bram@vim.org>
date Sun, 22 Sep 2019 23:15:03 +0200
parents 95719bfeced2
children f7d9f8fe70be
comparison
equal deleted inserted replaced
18145:2923095ca100 18146:591db862249a
2240 endfunc 2240 endfunc
2241 END 2241 END
2242 call writefile(lines, 'XSafeState') 2242 call writefile(lines, 'XSafeState')
2243 let buf = RunVimInTerminal('-S XSafeState', #{rows: 6}) 2243 let buf = RunVimInTerminal('-S XSafeState', #{rows: 6})
2244 2244
2245 " Sometimes we loop to handle an K_IGNORE
2245 call term_sendkeys(buf, ":echo g:safe\<CR>") 2246 call term_sendkeys(buf, ":echo g:safe\<CR>")
2246 call WaitForAssert({-> assert_match('^2 ', term_getline(buf, 6))}, 1000) 2247 call WaitForAssert({-> assert_match('^[12] ', term_getline(buf, 6))}, 1000)
2247 2248
2248 call term_sendkeys(buf, ":echo g:again\<CR>") 2249 call term_sendkeys(buf, ":echo g:again\<CR>")
2249 call WaitForAssert({-> assert_match('^xxxx', term_getline(buf, 6))}, 1000) 2250 call WaitForAssert({-> assert_match('^xxxx', term_getline(buf, 6))}, 1000)
2250 2251
2251 call term_sendkeys(buf, ":let g:again = ''\<CR>:call CallTimer()\<CR>") 2252 call term_sendkeys(buf, ":let g:again = ''\<CR>:call CallTimer()\<CR>")
2252 call term_wait(buf) 2253 call term_wait(buf, 50)
2253 call term_sendkeys(buf, ":echo g:again\<CR>") 2254 call term_sendkeys(buf, ":echo g:again\<CR>")
2254 call WaitForAssert({-> assert_match('xtx', term_getline(buf, 6))}, 1000) 2255 call WaitForAssert({-> assert_match('xtx', term_getline(buf, 6))}, 1000)
2255 2256
2256 call StopVimInTerminal(buf) 2257 call StopVimInTerminal(buf)
2257 call delete('XSafeState') 2258 call delete('XSafeState')