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)
diff --git a/runtime/doc/testing.txt b/runtime/doc/testing.txt
index fb43fbc..e5b9134 100644
--- a/runtime/doc/testing.txt
+++ b/runtime/doc/testing.txt
@@ -121,6 +121,24 @@
|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