# HG changeset patch # User Bram Moolenaar # Date 1553552104 -3600 # Node ID 3da6df816d8a79db5078b367950643dc8059612f # Parent c18ba30d4097c707abd5cd74c806be4d196a640d patch 8.1.1051: not all ways to switch terminal mode are tested commit https://github.com/vim/vim/commit/a4c2a24cc7772d882289a617104fe968a15969d7 Author: Bram Moolenaar Date: Mon Mar 25 23:01:38 2019 +0100 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 --- 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 --- a/src/version.c +++ b/src/version.c @@ -776,6 +776,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1051, +/**/ 1050, /**/ 1049,