forked from aniani/vim
patch 8.2.3102: test for crash fix does not fail without the fix
Problem: Test for crash fix does not fail without the fix. Solution: Adjust the test sequence. (closes #8506)
This commit is contained in:
@@ -373,18 +373,22 @@ func Test_swap_prompt_splitwin()
|
|||||||
call WaitForAssert({-> assert_match('^1$', term_getline(buf, 20))})
|
call WaitForAssert({-> assert_match('^1$', term_getline(buf, 20))})
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
|
|
||||||
" This caused Vim to crash when typing "q".
|
" This caused Vim to crash when typing "q" at the swap file prompt.
|
||||||
" TODO: it does not actually reproduce the crash.
|
let buf = RunVimInTerminal('-c "au bufadd * let foo_w = wincol()"', {'rows': 18})
|
||||||
call writefile(['au BufAdd * set virtualedit=all'], 'Xvimrc')
|
call term_sendkeys(buf, ":e Xfile1\<CR>")
|
||||||
|
call WaitForAssert({-> assert_match('More', term_getline(buf, 18))})
|
||||||
let buf = RunVimInTerminal('-u Xvimrc Xfile1', {'rows': 20, 'wait_for_ruler': 0})
|
call term_sendkeys(buf, " ")
|
||||||
call TermWait(buf)
|
call WaitForAssert({-> assert_match('^\[O\]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:', term_getline(buf, 18))})
|
||||||
call WaitForAssert({-> assert_match('^\[O\]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:', term_getline(buf, 20))})
|
|
||||||
call term_sendkeys(buf, "q")
|
call term_sendkeys(buf, "q")
|
||||||
|
call TermWait(buf)
|
||||||
|
" check that Vim is still running
|
||||||
|
call term_sendkeys(buf, ":echo 'hello'\<CR>")
|
||||||
|
call WaitForAssert({-> assert_match('^hello', term_getline(buf, 18))})
|
||||||
|
call term_sendkeys(buf, ":%bwipe!\<CR>")
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
|
|
||||||
%bwipe!
|
%bwipe!
|
||||||
call delete('Xfile1')
|
call delete('Xfile1')
|
||||||
call delete('Xvimrc')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_swap_symlink()
|
func Test_swap_symlink()
|
||||||
|
|||||||
@@ -755,6 +755,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3102,
|
||||||
/**/
|
/**/
|
||||||
3101,
|
3101,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user