diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-08-21 13:19:31 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-08-21 14:16:16 +0800 |
commit | 0defbd38e41899e359379ce4634681b02a897bc3 (patch) | |
tree | 70d3006cde3dc5adbc9e2d6932f2220c0f334eff | |
parent | 3e79afec5485b17fe8e91658cc1de6fab6ec55f1 (diff) | |
download | rneovim-0defbd38e41899e359379ce4634681b02a897bc3.tar.gz rneovim-0defbd38e41899e359379ce4634681b02a897bc3.tar.bz2 rneovim-0defbd38e41899e359379ce4634681b02a897bc3.zip |
vim-patch:8.1.2068: test for SafeState and SafeStateAgain may fail
Problem: Test for SafeState and SafeStateAgain may fail.
Solution: Accept more possible responses
https://github.com/vim/vim/commit/513537bfff59b94a26c63ab2bd458f21d4be774e
Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r-- | test/old/testdir/test_autocmd.vim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/old/testdir/test_autocmd.vim b/test/old/testdir/test_autocmd.vim index c279073e08..f5ab03cf22 100644 --- a/test/old/testdir/test_autocmd.vim +++ b/test/old/testdir/test_autocmd.vim @@ -2974,14 +2974,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) |