comparison runtime/doc/testing.txt @ 25700:d4faa2c5211b

Update runtime files Commit: https://github.com/vim/vim/commit/89a9c159f23fb7b3e24e6d09068adfc24a73afcb Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 29 21:55:35 2021 +0200 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Sun, 29 Aug 2021 22:00:05 +0200
parents 29ec2c198c8d
children 3b34837f4538
comparison
equal deleted inserted replaced
25699:8088e687c3d7 25700:d4faa2c5211b
1 *testing.txt* For Vim version 8.2. Last change: 2021 Jul 07 1 *testing.txt* For Vim version 8.2. Last change: 2021 Aug 15
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
44 smaller than one it fails one time. 44 smaller than one it fails one time.
45 45
46 Can also be used as a |method|: > 46 Can also be used as a |method|: >
47 GetAllocId()->test_alloc_fail() 47 GetAllocId()->test_alloc_fail()
48 48
49
49 test_autochdir() *test_autochdir()* 50 test_autochdir() *test_autochdir()*
50 Set a flag to enable the effect of 'autochdir' before Vim 51 Set a flag to enable the effect of 'autochdir' before Vim
51 startup has finished. 52 startup has finished.
52 53
53 54
56 were typed by the user. This uses a low level input buffer. 57 were typed by the user. This uses a low level input buffer.
57 This function works only when with |+unix| or GUI is running. 58 This function works only when with |+unix| or GUI is running.
58 59
59 Can also be used as a |method|: > 60 Can also be used as a |method|: >
60 GetText()->test_feedinput() 61 GetText()->test_feedinput()
62
61 63
62 test_garbagecollect_now() *test_garbagecollect_now()* 64 test_garbagecollect_now() *test_garbagecollect_now()*
63 Like garbagecollect(), but executed right away. This must 65 Like garbagecollect(), but executed right away. This must
64 only be called directly to avoid any structure to exist 66 only be called directly to avoid any structure to exist
65 internally, and |v:testing| must have been set before calling 67 internally, and |v:testing| must have been set before calling
130 errors is made empty. 132 errors is made empty.
131 133
132 Can also be used as a |method|: > 134 Can also be used as a |method|: >
133 GetErrorText()->test_ignore_error() 135 GetErrorText()->test_ignore_error()
134 136
137
135 test_null_blob() *test_null_blob()* 138 test_null_blob() *test_null_blob()*
136 Return a |Blob| that is null. Only useful for testing. 139 Return a |Blob| that is null. Only useful for testing.
137 140
138 141
139 test_null_channel() *test_null_channel()* 142 test_null_channel() *test_null_channel()*
162 Return a |Partial| that is null. Only useful for testing. 165 Return a |Partial| that is null. Only useful for testing.
163 166
164 167
165 test_null_string() *test_null_string()* 168 test_null_string() *test_null_string()*
166 Return a |String| that is null. Only useful for testing. 169 Return a |String| that is null. Only useful for testing.
167
168
169 test_unknown() *test_unknown()*
170 Return a value with unknown type. Only useful for testing.
171
172 test_void() *test_void()*
173 Return a value with void type. Only useful for testing.
174 170
175 171
176 test_option_not_set({name}) *test_option_not_set()* 172 test_option_not_set({name}) *test_option_not_set()*
177 Reset the flag that indicates option {name} was set. Thus it 173 Reset the flag that indicates option {name} was set. Thus it
178 looks like it still has the default value. Use like this: > 174 looks like it still has the default value. Use like this: >
222 call test_override('starting', 0) 218 call test_override('starting', 0)
223 219
224 < Can also be used as a |method|: > 220 < Can also be used as a |method|: >
225 GetOverrideVal()-> test_override('starting') 221 GetOverrideVal()-> test_override('starting')
226 222
223
227 test_refcount({expr}) *test_refcount()* 224 test_refcount({expr}) *test_refcount()*
228 Return the reference count of {expr}. When {expr} is of a 225 Return the reference count of {expr}. When {expr} is of a
229 type that does not have a reference count, returns -1. Only 226 type that does not have a reference count, returns -1. Only
230 to be used for testing. 227 to be used for testing.
231 228
251 obviously only when using the GUI. 248 obviously only when using the GUI.
252 249
253 Can also be used as a |method|: > 250 Can also be used as a |method|: >
254 GetValue()->test_scrollbar('right', 0) 251 GetValue()->test_scrollbar('right', 0)
255 252
253
256 test_setmouse({row}, {col}) *test_setmouse()* 254 test_setmouse({row}, {col}) *test_setmouse()*
257 Set the mouse position to be used for the next mouse action. 255 Set the mouse position to be used for the next mouse action.
258 {row} and {col} are one based. 256 {row} and {col} are one based.
259 For example: > 257 For example: >
260 call test_setmouse(4, 20) 258 call test_setmouse(4, 20)
261 call feedkeys("\<LeftMouse>", "xt") 259 call feedkeys("\<LeftMouse>", "xt")
260
262 261
263 test_settime({expr}) *test_settime()* 262 test_settime({expr}) *test_settime()*
264 Set the time Vim uses internally. Currently only used for 263 Set the time Vim uses internally. Currently only used for
265 timestamps in the history, as they are used in viminfo, and 264 timestamps in the history, as they are used in viminfo, and
266 for undo. 265 for undo.
270 normal behavior is restored. 269 normal behavior is restored.
271 270
272 Can also be used as a |method|: > 271 Can also be used as a |method|: >
273 GetTime()->test_settime() 272 GetTime()->test_settime()
274 273
274
275 test_srand_seed([seed]) *test_srand_seed()* 275 test_srand_seed([seed]) *test_srand_seed()*
276 When [seed] is given this sets the seed value used by 276 When [seed] is given this sets the seed value used by
277 `srand()`. When omitted the test seed is removed. 277 `srand()`. When omitted the test seed is removed.
278
279
280 test_unknown() *test_unknown()*
281 Return a value with unknown type. Only useful for testing.
282
283
284 test_void() *test_void()*
285 Return a value with void type. Only useful for testing.
278 286
279 ============================================================================== 287 ==============================================================================
280 3. Assert functions *assert-functions-details* 288 3. Assert functions *assert-functions-details*
281 289
282 290