Mercurial > vim
comparison runtime/doc/testing.txt @ 27537:063952f68595
Update runtime files.
Commit: https://github.com/vim/vim/commit/a2baa73d1d33014adea0fd9567949089ca21a782
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Feb 4 16:09:54 2022 +0000
Update runtime files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 04 Feb 2022 17:15:05 +0100 |
parents | f0096e5b3df9 |
children | 9fe2fed9bb4b |
comparison
equal
deleted
inserted
replaced
27536:de1ec574cab2 | 27537:063952f68595 |
---|---|
1 *testing.txt* For Vim version 8.2. Last change: 2022 Jan 23 | 1 *testing.txt* For Vim version 8.2. Last change: 2022 Feb 04 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
63 | 63 |
64 test_garbagecollect_now() *test_garbagecollect_now()* | 64 test_garbagecollect_now() *test_garbagecollect_now()* |
65 Like garbagecollect(), but executed right away. This must | 65 Like garbagecollect(), but executed right away. This must |
66 only be called directly to avoid any structure to exist | 66 only be called directly to avoid any structure to exist |
67 internally, and |v:testing| must have been set before calling | 67 internally, and |v:testing| must have been set before calling |
68 any function. This will not work when called from a :def | 68 any function. *E1142* |
69 function, because variables on the stack will be freed. | 69 This will not work when called from a :def function, because |
70 variables on the stack will be freed. | |
70 | 71 |
71 | 72 |
72 test_garbagecollect_soon() *test_garbagecollect_soon()* | 73 test_garbagecollect_soon() *test_garbagecollect_soon()* |
73 Set the flag to call the garbagecollector as if in the main | 74 Set the flag to call the garbagecollector as if in the main |
74 loop. Only to be used in tests. | 75 loop. Only to be used in tests. |
90 | 91 |
91 {event} is a String and the supported values are: | 92 {event} is a String and the supported values are: |
92 "dropfiles" drop one or more files in a window. | 93 "dropfiles" drop one or more files in a window. |
93 "findrepl" search and replace text | 94 "findrepl" search and replace text |
94 "mouse" mouse button click event. | 95 "mouse" mouse button click event. |
96 "scrollbar" move or drag the scrollbar | |
95 "tabline" select a tab page by mouse click. | 97 "tabline" select a tab page by mouse click. |
96 "tabmenu" select a tabline menu entry. | 98 "tabmenu" select a tabline menu entry. |
97 | 99 |
98 {args} is a Dict and contains the arguments for the event. | 100 {args} is a Dict and contains the arguments for the event. |
99 | 101 |
111 file in {files} is edited in the window. See |drag-n-drop| | 113 file in {files} is edited in the window. See |drag-n-drop| |
112 for more information. This event works only when the | 114 for more information. This event works only when the |
113 |drop_file| feature is present. | 115 |drop_file| feature is present. |
114 | 116 |
115 "findrepl": | 117 "findrepl": |
118 {only available when the GUI has a find/replace dialog} | |
116 Perform a search and replace of text. The supported items | 119 Perform a search and replace of text. The supported items |
117 in {args} are: | 120 in {args} are: |
118 find_text: string to find. | 121 find_text: string to find. |
119 repl_text: replacement string | 122 repl_text: replacement string |
120 flags: flags controlling the find/replace. Supported | 123 flags: flags controlling the find/replace. Supported |
147 modifiers: key modifiers. The supported values are: | 150 modifiers: key modifiers. The supported values are: |
148 4 shift is pressed | 151 4 shift is pressed |
149 8 alt is pressed | 152 8 alt is pressed |
150 16 ctrl is pressed | 153 16 ctrl is pressed |
151 | 154 |
155 "scrollbar": | |
156 Set or drag the left, right or horizontal scrollbar. Only | |
157 works when the scrollbar actually exists. The supported | |
158 items in {args} are: | |
159 which: scrollbar. The supported values are: | |
160 left Left scrollbar of the current window | |
161 right Right scrollbar of the current window | |
162 hor Horizontal scrollbar | |
163 value: amount to scroll. For the vertical scrollbars | |
164 the value can be 1 to the line-count of the | |
165 buffer. For the horizontal scrollbar the | |
166 value can be between 1 and the maximum line | |
167 length, assuming 'wrap' is not set. | |
168 dragging: 1 to drag the scrollbar and 0 to click in the | |
169 scrollbar. | |
170 | |
152 "tabline": | 171 "tabline": |
153 Inject a mouse click event on the tabline to select a | 172 Inject a mouse click event on the tabline to select a |
154 tabpage. The supported items in {args} are: | 173 tabpage. The supported items in {args} are: |
155 tabnr: tab page number | 174 tabnr: tab page number |
156 | 175 |
282 | 301 |
283 Can also be used as a |method|: > | 302 Can also be used as a |method|: > |
284 GetVarname()->test_refcount() | 303 GetVarname()->test_refcount() |
285 | 304 |
286 | 305 |
287 test_scrollbar({which}, {value}, {dragging}) *test_scrollbar()* | |
288 Pretend using scrollbar {which} to move it to position | |
289 {value}. {which} can be: | |
290 left Left scrollbar of the current window | |
291 right Right scrollbar of the current window | |
292 hor Horizontal scrollbar | |
293 | |
294 For the vertical scrollbars {value} can be 1 to the | |
295 line-count of the buffer. For the horizontal scrollbar the | |
296 {value} can be between 1 and the maximum line length, assuming | |
297 'wrap' is not set. | |
298 | |
299 When {dragging} is non-zero it's like dragging the scrollbar, | |
300 otherwise it's like clicking in the scrollbar. | |
301 Only works when the {which} scrollbar actually exists, | |
302 obviously only when using the GUI. | |
303 | |
304 Can also be used as a |method|: > | |
305 GetValue()->test_scrollbar('right', 0) | |
306 | |
307 | |
308 test_setmouse({row}, {col}) *test_setmouse()* | 306 test_setmouse({row}, {col}) *test_setmouse()* |
309 Set the mouse position to be used for the next mouse action. | 307 Set the mouse position to be used for the next mouse action. |
310 {row} and {col} are one based. | 308 {row} and {col} are one based. |
311 For example: > | 309 For example: > |
312 call test_setmouse(4, 20) | 310 call test_setmouse(4, 20) |