summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2022-01-27 13:16:59 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-27 13:16:59 +0000
commitb0ad2d92fd19e673ddbbc66742bae3f71778efde (patch)
tree4029f2cb1c3d7b73cad2a52ede1586876949c774 /runtime
parente939f5ebbae8dd7825d62d84e0c9910fa1756a9c (diff)
patch 8.2.4228: no tests for clicking in the GUI tablinev8.2.4228
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)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/builtin.txt3
-rw-r--r--runtime/doc/testing.txt18
-rw-r--r--runtime/doc/usr_41.txt2
3 files changed, 23 insertions, 0 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 7bb48b8c3d..bfb63d0d59 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -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
diff --git a/runtime/doc/testing.txt b/runtime/doc/testing.txt
index fb43fbc02d..e5b9134736 100644
--- a/runtime/doc/testing.txt
+++ b/runtime/doc/testing.txt
@@ -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
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 71a4850eda..66b267f935 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -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