forked from aniani/vim
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:
committed by
Bram Moolenaar
parent
e939f5ebba
commit
b0ad2d92fd
@@ -645,6 +645,9 @@ test_gui_drop_files({list}, {row}, {col}, {mods})
|
||||
none drop a list of files in a window
|
||||
test_gui_mouse_event({button}, {row}, {col}, {repeated}, {mods})
|
||||
none add a mouse event to the input buffer
|
||||
test_gui_tabline_event({tabnr}) Bool add a tabline event to the input buffer
|
||||
test_gui_tabmenu_event({tabnr}, {event})
|
||||
none add a tabmenu event to the input buffer
|
||||
test_ignore_error({expr}) none ignore a specific error
|
||||
test_null_blob() Blob null value for testing
|
||||
test_null_channel() Channel null value for testing
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1118,6 +1118,8 @@ Testing: *test-functions*
|
||||
test_getvalue() get value of an internal variable
|
||||
test_gui_drop_files() drop file(s) in a window
|
||||
test_gui_mouse_event() add a GUI mouse event to the input buffer
|
||||
test_gui_tabline_event() add a GUI tabline event to the input buffer
|
||||
test_gui_tabmenu_event() add a GUI tabmenu event to the input buffer
|
||||
test_ignore_error() ignore a specific error message
|
||||
test_null_blob() return a null Blob
|
||||
test_null_channel() return a null Channel
|
||||
|
||||
Reference in New Issue
Block a user