Mercurial > vim
diff src/testdir/test_gui.vim @ 20365:6bcd12791bf1 v8.2.0738
patch 8.2.0738: mouse handling in a terminal window not well tested
Commit: https://github.com/vim/vim/commit/91689ea8ae01acb3daf8ba0ee91acd729af7c84c
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon May 11 22:04:53 2020 +0200
patch 8.2.0738: mouse handling in a terminal window not well tested
Problem: Mouse handling in a terminal window not well tested.
Solution: Add tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/6052)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 11 May 2020 22:15:04 +0200 |
parents | 3d1de9093c01 |
children | 86333cdb8cf8 |
line wrap: on
line diff
--- a/src/testdir/test_gui.vim +++ b/src/testdir/test_gui.vim @@ -838,4 +838,22 @@ func Test_gui_dash_y() call delete('Xtestgui') endfunc +" Test for "!" option in 'guioptions'. Use a terminal for running external +" commands +func Test_gui_run_cmd_in_terminal() + let save_guioptions = &guioptions + set guioptions+=! + if has('win32') + let cmd = 'type' + else + " assume all the other systems have a cat command + let cmd = 'cat' + endif + let cmd = ':silent !' . cmd . " test_gui.vim\<CR>\<CR>" + call feedkeys(cmd, 'xt') + " TODO: how to check that the command ran in a separate terminal? + " Maybe check for $TERM (dumb vs xterm) in the spawned shell? + let &guioptions = save_guioptions +endfunc + " vim: shiftwidth=2 sts=2 expandtab