From: Bram Moolenaar Date: Mon, 25 Mar 2019 22:01:38 +0000 (+0100) Subject: patch 8.1.1051: not all ways to switch terminal mode are tested X-Git-Tag: v8.1.1051 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a4c2a24cc7772d882289a617104fe968a15969d7;p=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. --- diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index aed729ec3..be44c14ea 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -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("\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("\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("\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("\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 diff --git a/src/version.c b/src/version.c index f4496423c..13db4015e 100644 --- a/src/version.c +++ b/src/version.c @@ -775,6 +775,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1051, /**/ 1050, /**/