summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2021-06-21 18:44:26 +0200
committerBram Moolenaar <Bram@vim.org>2021-06-21 18:44:26 +0200
commitf1e7449d567c630601aa0cec6c663b791785a668 (patch)
treeb2c0247a651d4fc70af649b1951392d5acca9658 /runtime
parent2ac4b2536a40e5cd75b4ff7a3d44a282d2f4f008 (diff)
patch 8.2.3028: GUI mouse events not testedv8.2.3028
Problem: GUI mouse events not tested. Solution: Add test_gui_mouse_event(). Add mouse tests. Also add a few viminfo tests. (Yegappan Lakshmanan, closes #8407)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt2
-rw-r--r--runtime/doc/testing.txt26
-rw-r--r--runtime/doc/usr_41.txt1
3 files changed, 28 insertions, 1 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 4620623c63..1f52d9f05b 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -3022,6 +3022,8 @@ test_feedinput({string}) none add key sequence to input buffer
test_garbagecollect_now() none free memory right now for testing
test_garbagecollect_soon() none free memory soon for testing
test_getvalue({string}) any get value of an internal variable
+test_gui_mouse_event({button}, {row}, {col}, {repeated}, {mods})
+ none add a mouse 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 6fd2d45887..db505e7efc 100644
--- a/runtime/doc/testing.txt
+++ b/runtime/doc/testing.txt
@@ -1,4 +1,4 @@
-*testing.txt* For Vim version 8.2. Last change: 2021 Apr 02
+*testing.txt* For Vim version 8.2. Last change: 2021 Jun 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -78,6 +78,30 @@ test_getvalue({name}) *test_getvalue()*
Can also be used as a |method|: >
GetName()->test_getvalue()
+<
+ *test_gui_mouse_event()*
+test_gui_mouse_event({button}, {row}, {col}, {multiclick}, {modifiers})
+ Inject a mouse button click event. This function works only
+ when GUI is running.
+ The supported values for {button} are:
+ 0 right mouse button
+ 1 middle mouse button
+ 2 left mouse button
+ 3 mouse button release
+ 4 scroll wheel down
+ 5 scroll wheel up
+ 6 scroll wheel left
+ 7 scroll wheel right
+ {row} and {col} specify the location of the mouse click.
+ To inject a multiclick event, set {multiclick} to 1.
+ The supported values for {modifiers} are:
+ 4 shift is pressed
+ 8 alt is pressed
+ 16 ctrl is pressed
+ After injecting the mouse 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 09d5a39db7..de7f197078 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -1021,6 +1021,7 @@ Testing: *test-functions*
test_garbagecollect_now() free memory right now
test_garbagecollect_soon() set a flag to free memory soon
test_getvalue() get value of an internal variable
+ test_gui_mouse_event() add a GUI mouse 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