Mercurial > vim
changeset 16093:3da6df816d8a v8.1.1051
patch 8.1.1051: not all ways to switch terminal mode are tested
commit https://github.com/vim/vim/commit/a4c2a24cc7772d882289a617104fe968a15969d7
Author: Bram Moolenaar <Bram@vim.org>
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 25 Mar 2019 23:15:04 +0100 |
parents | c18ba30d4097 |
children | bed3ace39db3 |
files | src/testdir/test_terminal.vim src/version.c |
diffstat | 2 files changed, 25 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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("\<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