diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-05-01 18:47:59 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-05-01 18:47:59 +0200 |
commit | b2ac14c0b5e23f8ab97c5c784bcd83e13ba8ded3 (patch) | |
tree | ccd71c85b849644e14fdbb4f85d2658542443dee /src/testdir/test_terminal.vim | |
parent | 8a938af6ddefab4b4bc751d3f3545e1d95622c8a (diff) | |
download | vim-b2ac14c0b5e23f8ab97c5c784bcd83e13ba8ded3.zip |
patch 8.0.1786: no test for 'termwinkey'
Problem: No test for 'termwinkey'.
Solution: Add a test. Make feedkeys() handle terminal_loop() returning
before characters are consumed.
Diffstat (limited to 'src/testdir/test_terminal.vim')
-rw-r--r-- | src/testdir/test_terminal.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index 0f7234665..cde41a1d6 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -1471,3 +1471,19 @@ func Test_terminal_termwinsize_mininmum() set termwinsize= endfunc + +func Test_terminal_termwinkey() + call assert_equal(1, winnr('$')) + let thiswin = win_getid() + + let buf = Run_shell_in_terminal({}) + let termwin = bufwinid(buf) + set termwinkey=<C-L> + call feedkeys("\<C-L>w", 'tx') + call assert_equal(thiswin, win_getid()) + call feedkeys("\<C-W>w", 'tx') + + let job = term_getjob(buf) + call feedkeys("\<C-L>\<C-C>", 'tx') + call WaitForAssert({-> assert_equal("dead", job_status(job))}) +endfunc |