# HG changeset patch # User Bram Moolenaar # Date 1625412603 -7200 # Node ID ba16f025f2e2eaf171c8c7581aa853f1c0d84b63 # Parent 6b43aea6a93e8f264d4b1c2040b74fdef513b751 patch 8.2.3102: test for crash fix does not fail without the fix Commit: https://github.com/vim/vim/commit/3777d6e32b22f0a70b774760c24160079e303bad Author: Bram Moolenaar Date: Sun Jul 4 17:23:25 2021 +0200 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 https://github.com/vim/vim/issues/8506) diff --git a/src/testdir/test_swap.vim b/src/testdir/test_swap.vim --- a/src/testdir/test_swap.vim +++ b/src/testdir/test_swap.vim @@ -373,18 +373,22 @@ func Test_swap_prompt_splitwin() call WaitForAssert({-> assert_match('^1$', term_getline(buf, 20))}) call StopVimInTerminal(buf) - " This caused Vim to crash when typing "q". - " TODO: it does not actually reproduce the crash. - call writefile(['au BufAdd * set virtualedit=all'], 'Xvimrc') - - let buf = RunVimInTerminal('-u Xvimrc Xfile1', {'rows': 20, 'wait_for_ruler': 0}) + " This caused Vim to crash when typing "q" at the swap file prompt. + let buf = RunVimInTerminal('-c "au bufadd * let foo_w = wincol()"', {'rows': 18}) + call term_sendkeys(buf, ":e Xfile1\") + call WaitForAssert({-> assert_match('More', term_getline(buf, 18))}) + call term_sendkeys(buf, " ") + call WaitForAssert({-> assert_match('^\[O\]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:', term_getline(buf, 18))}) + call term_sendkeys(buf, "q") call TermWait(buf) - 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") + " check that Vim is still running + call term_sendkeys(buf, ":echo 'hello'\") + call WaitForAssert({-> assert_match('^hello', term_getline(buf, 18))}) + call term_sendkeys(buf, ":%bwipe!\") + call StopVimInTerminal(buf) %bwipe! call delete('Xfile1') - call delete('Xvimrc') endfunc func Test_swap_symlink() diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -756,6 +756,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3102, +/**/ 3101, /**/ 3100,