diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-03-24 21:44:51 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-03-24 21:44:51 +0100 |
commit | d36ef573b2fad620824495f5423cb649cde55e03 (patch) | |
tree | 4a1e69cfb38dc7727bd6b72fcfb4f1b69b5e0e02 | |
parent | 45fffdf10b7cb6e59794e76e9b8a2930fcb4b192 (diff) | |
download | vim-git-8.2.0444.tar.gz |
patch 8.2.0444: swap file test fails on some systemsv8.2.0444
Problem: Swap file test fails on some systems.
Solution: Preserve the swap file. Send NL terminated keys.
-rw-r--r-- | src/testdir/test_swap.vim | 12 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/testdir/test_swap.vim b/src/testdir/test_swap.vim index cc452c3a7..612832c96 100644 --- a/src/testdir/test_swap.vim +++ b/src/testdir/test_swap.vim @@ -1,5 +1,6 @@ " Tests for the swap feature +source check.vim source shared.vim source term_util.vim @@ -352,11 +353,12 @@ endfunc " Test for selecting 'q' in the attention prompt func Test_swap_prompt_splitwin() - if !CanRunVimInTerminal() - throw 'Skipped: cannot run vim in terminal' - endif + CheckRunVimInTerminal + call writefile(['foo bar'], 'Xfile1') edit Xfile1 + preserve " should help to make sure the swap file exists + let buf = RunVimInTerminal('', {'rows': 20}) call term_sendkeys(buf, ":set nomore\n") call term_sendkeys(buf, ":set noruler\n") @@ -365,9 +367,9 @@ func Test_swap_prompt_splitwin() 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_wait(buf) - call term_sendkeys(buf, ":") + call term_sendkeys(buf, ":\<CR>") call WaitForAssert({-> assert_match('^:$', term_getline(buf, 20))}) - call term_sendkeys(buf, "echomsg winnr('$')\<CR>") + call term_sendkeys(buf, ":echomsg winnr('$')\<CR>") call term_wait(buf) call WaitForAssert({-> assert_match('^1$', term_getline(buf, 20))}) call StopVimInTerminal(buf) diff --git a/src/version.c b/src/version.c index 2e219a9a6..4230f545e 100644 --- a/src/version.c +++ b/src/version.c @@ -739,6 +739,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 444, +/**/ 443, /**/ 442, |