forked from aniani/vim
patch 7.4.1838
Problem: Functions specifically for testing do not sort together.
Solution: Rename garbagecollect_for_testing() to test_garbagecollect_now().
Add test_null_list(), test_null_dict(), etc.
This commit is contained in:
@@ -1955,7 +1955,6 @@ foreground() Number bring the Vim window to the foreground
|
||||
function({name} [, {arglist}] [, {dict}])
|
||||
Funcref reference to function {name}
|
||||
garbagecollect([{atexit}]) none free memory, breaking cyclic references
|
||||
garbagecollect_for_testing() none free memory right now
|
||||
get({list}, {idx} [, {def}]) any get item {idx} from {list} or {def}
|
||||
get({dict}, {key} [, {def}]) any get item {key} from {dict} or {def}
|
||||
getbufline({expr}, {lnum} [, {end}])
|
||||
@@ -2203,6 +2202,13 @@ tagfiles() List tags files used
|
||||
tan({expr}) Float tangent of {expr}
|
||||
tanh({expr}) Float hyperbolic tangent of {expr}
|
||||
tempname() String name for a temporary file
|
||||
test_garbagecollect_now() none free memory right now for testing
|
||||
test_null_channel() Channel null value for testing
|
||||
test_null_dict() Dict null value for testing
|
||||
test_null_job() Job null value for testing
|
||||
test_null_list() List null value for testing
|
||||
test_null_partial() Funcref null value for testing
|
||||
test_null_string() String null value for testing
|
||||
timer_start({time}, {callback} [, {options}])
|
||||
Number create a timer
|
||||
timer_stop({timer}) none stop a timer
|
||||
@@ -3752,11 +3758,10 @@ garbagecollect([{atexit}]) *garbagecollect()*
|
||||
collection will also be done when exiting Vim, if it wasn't
|
||||
done before. This is useful when checking for memory leaks.
|
||||
|
||||
garbagecollect_for_testing() *garbagecollect_for_testing()*
|
||||
Like garbagecollect(), but executed right away. This must
|
||||
only be called directly to avoid any structure to exist
|
||||
internally, and |v:testing| must have been set before calling
|
||||
any function.
|
||||
The garbage collection is not done immediately but only when
|
||||
it's safe to perform. This is when waiting for the user to
|
||||
type a character. To force garbage collection immediately use
|
||||
|test_garbagecollect_now()|.
|
||||
|
||||
get({list}, {idx} [, {default}]) *get()*
|
||||
Get item {idx} from |List| {list}. When this item is not
|
||||
@@ -7165,17 +7170,6 @@ taglist({expr}) *taglist()*
|
||||
located by Vim. Refer to |tags-file-format| for the format of
|
||||
the tags file generated by the different ctags tools.
|
||||
|
||||
tempname() *tempname()* *temp-file-name*
|
||||
The result is a String, which is the name of a file that
|
||||
doesn't exist. It can be used for a temporary file. The name
|
||||
is different for at least 26 consecutive calls. Example: >
|
||||
:let tmpfile = tempname()
|
||||
:exe "redir > " . tmpfile
|
||||
< For Unix, the file will be in a private directory |tempfile|.
|
||||
For MS-Windows forward slashes are used when the 'shellslash'
|
||||
option is set or when 'shellcmdflag' starts with '-'.
|
||||
|
||||
|
||||
tan({expr}) *tan()*
|
||||
Return the tangent of {expr}, measured in radians, as a |Float|
|
||||
in the range [-inf, inf].
|
||||
@@ -7200,6 +7194,44 @@ tanh({expr}) *tanh()*
|
||||
{only available when compiled with the |+float| feature}
|
||||
|
||||
|
||||
tempname() *tempname()* *temp-file-name*
|
||||
The result is a String, which is the name of a file that
|
||||
doesn't exist. It can be used for a temporary file. The name
|
||||
is different for at least 26 consecutive calls. Example: >
|
||||
:let tmpfile = tempname()
|
||||
:exe "redir > " . tmpfile
|
||||
< For Unix, the file will be in a private directory |tempfile|.
|
||||
For MS-Windows forward slashes are used when the 'shellslash'
|
||||
option is set or when 'shellcmdflag' starts with '-'.
|
||||
|
||||
|
||||
test_garbagecollect_now() *test_garbagecollect_now()*
|
||||
Like garbagecollect(), but executed right away. This must
|
||||
only be called directly to avoid any structure to exist
|
||||
internally, and |v:testing| must have been set before calling
|
||||
any function.
|
||||
|
||||
test_null_channel() *test_null_channel()*
|
||||
Return a Channel that is null. Only useful for testing.
|
||||
{only available when compiled with the +channel feature}
|
||||
|
||||
test_null_dict() *test_null_dict()*
|
||||
Return a Dict that is null. Only useful for testing.
|
||||
|
||||
test_null_job() *test_null_job()*
|
||||
Return a Job that is null. Only useful for testing.
|
||||
{only available when compiled with the +job feature}
|
||||
|
||||
test_null_list() *test_null_list()*
|
||||
Return a List that is null. Only useful for testing.
|
||||
|
||||
test_null_partial() *test_null_partial()*
|
||||
Return a Partial that is null. Only useful for testing.
|
||||
|
||||
test_null_string() *test_null_string()*
|
||||
Return a String that is null. Only useful for testing.
|
||||
|
||||
|
||||
*timer_start()*
|
||||
timer_start({time}, {callback} [, {options}])
|
||||
Create a timer and return the timer ID.
|
||||
|
||||
Reference in New Issue
Block a user