mirror of
https://github.com/vim/vim.git
synced 2025-09-30 04:44:14 -04:00
patch 8.2.1938: wiping out a terminal buffer makes some tests fail
Problem: Wiping out a terminal buffer makes some tests fail. Solution: Do not wipe out the terminal buffer unless wanted.
This commit is contained in:
@@ -134,7 +134,7 @@ func RunVimInTerminal(arguments, options)
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Stop a Vim running in terminal buffer "buf".
|
" Stop a Vim running in terminal buffer "buf".
|
||||||
func StopVimInTerminal(buf)
|
func StopVimInTerminal(buf, kill = 1)
|
||||||
" Using a terminal to run Vim is always considered flaky.
|
" Using a terminal to run Vim is always considered flaky.
|
||||||
let g:test_is_flaky = 1
|
let g:test_is_flaky = 1
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ func StopVimInTerminal(buf)
|
|||||||
call WaitForAssert({-> assert_equal("finished", term_getstatus(a:buf))})
|
call WaitForAssert({-> assert_equal("finished", term_getstatus(a:buf))})
|
||||||
|
|
||||||
" If the buffer still exists forcefully wipe it.
|
" If the buffer still exists forcefully wipe it.
|
||||||
if bufexists(a:buf)
|
if a:kill && bufexists(a:buf)
|
||||||
exe a:buf .. 'bwipe!'
|
exe a:buf .. 'bwipe!'
|
||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -1230,7 +1230,7 @@ func Test_terminal_dumpwrite_errors()
|
|||||||
call assert_fails("call term_dumpwrite(buf, '')", 'E482:')
|
call assert_fails("call term_dumpwrite(buf, '')", 'E482:')
|
||||||
call assert_fails("call term_dumpwrite(buf, test_null_string())", 'E482:')
|
call assert_fails("call term_dumpwrite(buf, test_null_string())", 'E482:')
|
||||||
call test_garbagecollect_now()
|
call test_garbagecollect_now()
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf, 0)
|
||||||
call TermWait(buf)
|
call TermWait(buf)
|
||||||
call assert_fails("call term_dumpwrite(buf, 'Xtest.dump')", 'E958:')
|
call assert_fails("call term_dumpwrite(buf, 'Xtest.dump')", 'E958:')
|
||||||
call assert_fails('call term_sendkeys([], ":q\<CR>")', 'E745:')
|
call assert_fails('call term_sendkeys([], ":q\<CR>")', 'E745:')
|
||||||
|
@@ -560,7 +560,6 @@ func Test_terminal_getwinpos()
|
|||||||
call TermWait(buf)
|
call TermWait(buf)
|
||||||
call term_sendkeys(buf, ":q\<CR>")
|
call term_sendkeys(buf, ":q\<CR>")
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
exe buf . 'bwipe!'
|
|
||||||
set splitright&
|
set splitright&
|
||||||
only!
|
only!
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -750,6 +750,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 */
|
||||||
|
/**/
|
||||||
|
1938,
|
||||||
/**/
|
/**/
|
||||||
1937,
|
1937,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user