patch 8.2.4228: no tests for clicking in the GUI tabline

Problem:    No tests for clicking in the GUI tabline.
Solution:   Add test functions to generate the events.  Add tests using the
            functions. (Yegappan Lakshmanan, closes #9638)
This commit is contained in:
Yegappan Lakshmanan
2022-01-27 13:16:59 +00:00
committed by Bram Moolenaar
parent e939f5ebba
commit b0ad2d92fd
11 changed files with 169 additions and 3 deletions

View File

@ -121,6 +121,24 @@ test_gui_mouse_event({button}, {row}, {col}, {multiclick}, {modifiers})
|feedkeys()| to have them processed, e.g.: >
call feedkeys("y", 'Lx!')
*test_gui_tabline_event()*
test_gui_tabline_event({tabnr})
Add an event that simulates a click on the tabline to select
tabpage {tabnr} to the input buffer.
Returns TRUE if the event is successfully added, FALSE if
already in the tabpage {tabnr} or the cmdline window is open.
After injecting the event you probably should call
|feedkeys()| to have them processed, e.g.: >
call feedkeys("y", 'Lx!')
*test_gui_tabmenu_event()*
test_gui_tabmenu_event({tabnr}, {event})
Add an event that simulates selecting a tabline menu entry for
tabpage {tabnr} to the input buffer. {event} is 1 for the
first menu entry, 2 for the second entry and so on.
After injecting the event you probably should call
|feedkeys()| to have them processed, e.g.: >
call feedkeys("y", 'Lx!')
test_ignore_error({expr}) *test_ignore_error()*
Ignore any error containing {expr}. A normal message is given