Skip to content

Commit 513537b

Browse files
committed
patch 8.1.2068: test for SafeState and SafeStateAgain may fail
Problem: Test for SafeState and SafeStateAgain may fail. Solution: Accept more possible responses
1 parent cadbe1b commit 513537b

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/testdir/test_autocmd.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2242,14 +2242,15 @@ func Test_autocmd_SafeState()
22422242
call writefile(lines, 'XSafeState')
22432243
let buf = RunVimInTerminal('-S XSafeState', #{rows: 6})
22442244

2245+
" Sometimes we loop to handle an K_IGNORE
22452246
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)
22472248

22482249
call term_sendkeys(buf, ":echo g:again\<CR>")
22492250
call WaitForAssert({-> assert_match('^xxxx', term_getline(buf, 6))}, 1000)
22502251

22512252
call term_sendkeys(buf, ":let g:again = ''\<CR>:call CallTimer()\<CR>")
2252-
call term_wait(buf)
2253+
call term_wait(buf, 50)
22532254
call term_sendkeys(buf, ":echo g:again\<CR>")
22542255
call WaitForAssert({-> assert_match('xtx', term_getline(buf, 6))}, 1000)
22552256

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,8 @@ static char *(features[]) =
757757

758758
static int included_patches[] =
759759
{ /* Add new patch number below this line */
760+
/**/
761+
2068,
760762
/**/
761763
2067,
762764
/**/

0 commit comments

Comments
 (0)