forked from aniani/vim
patch 8.1.1051: not all ways to switch terminal mode are tested
Problem: Not all ways to switch terminal mode are tested. Solution: Add more test cases.
This commit is contained in:
@@ -1772,6 +1772,29 @@ func Test_terminal_hidden()
|
|||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_terminal_switch_mode()
|
||||||
|
term
|
||||||
|
let bnr = bufnr('$')
|
||||||
|
call WaitForAssert({-> assert_equal('running', term_getstatus(bnr))})
|
||||||
|
call feedkeys("\<C-W>N", 'xt')
|
||||||
|
call WaitForAssert({-> assert_equal('running,normal', term_getstatus(bnr))})
|
||||||
|
call feedkeys("A", 'xt')
|
||||||
|
call WaitForAssert({-> assert_equal('running', term_getstatus(bnr))})
|
||||||
|
call feedkeys("\<C-W>N", 'xt')
|
||||||
|
call WaitForAssert({-> assert_equal('running,normal', term_getstatus(bnr))})
|
||||||
|
call feedkeys("I", 'xt')
|
||||||
|
call WaitForAssert({-> assert_equal('running', term_getstatus(bnr))})
|
||||||
|
call feedkeys("\<C-W>Nv", 'xt')
|
||||||
|
call WaitForAssert({-> assert_equal('running,normal', term_getstatus(bnr))})
|
||||||
|
call feedkeys("I", 'xt')
|
||||||
|
call WaitForAssert({-> assert_equal('running', term_getstatus(bnr))})
|
||||||
|
call feedkeys("\<C-W>Nv", 'xt')
|
||||||
|
call WaitForAssert({-> assert_equal('running,normal', term_getstatus(bnr))})
|
||||||
|
call feedkeys("A", 'xt')
|
||||||
|
call WaitForAssert({-> assert_equal('running', term_getstatus(bnr))})
|
||||||
|
bwipe!
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_terminal_hidden_and_close()
|
func Test_terminal_hidden_and_close()
|
||||||
if !has('unix')
|
if !has('unix')
|
||||||
return
|
return
|
||||||
|
@@ -775,6 +775,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 */
|
||||||
|
/**/
|
||||||
|
1051,
|
||||||
/**/
|
/**/
|
||||||
1050,
|
1050,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user