Mercurial > vim
diff src/testdir/test_terminal.vim @ 12072:f4e1e1e6886b v8.0.0916
patch 8.0.0916: cannot specify properties of window for terminal open
commit https://github.com/vim/vim/commit/37c45835945fc433a3bb85fcfc0b4fd58b1ee0e7
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 12 16:01:04 2017 +0200
patch 8.0.0916: cannot specify properties of window for terminal open
Problem: Cannot specify properties of window for when opening a window for
a finished terminal job.
Solution: Add "term_opencmd".
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 12 Aug 2017 16:15:04 +0200 |
parents | 407a475c67fd |
children | 69f2392e6cfb |
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -320,7 +320,7 @@ func Test_terminal_curwin() endfunc -func Test_finish_close() +func Test_finish_open_close() call assert_equal(1, winnr('$')) if s:python != '' @@ -371,6 +371,19 @@ func Test_finish_close() call WaitFor("winnr('$') == 2", waittime) call assert_equal(2, winnr('$')) bwipe + + call assert_fails("call term_start(cmd, {'term_opencmd': 'open'})", 'E475:') + call assert_fails("call term_start(cmd, {'term_opencmd': 'split %x'})", 'E475:') + call assert_fails("call term_start(cmd, {'term_opencmd': 'split %d and %s'})", 'E475:') + call assert_fails("call term_start(cmd, {'term_opencmd': 'split % and %d'})", 'E475:') + + call term_start(cmd, {'term_finish': 'open', 'term_opencmd': '4split | buffer %d'}) + close + call WaitFor("winnr('$') == 2", waittime) + call assert_equal(2, winnr('$')) + call assert_equal(4, winheight(0)) + bwipe + endfunc func Test_terminal_cwd()