1
0
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:
Bram Moolenaar
2019-03-25 23:01:38 +01:00
parent 3dd174abbf
commit a4c2a24cc7
2 changed files with 25 additions and 0 deletions

View File

@@ -1772,6 +1772,29 @@ func Test_terminal_hidden()
bwipe!
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()
if !has('unix')
return

View File

@@ -775,6 +775,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1051,
/**/
1050,
/**/