mirror of
https://github.com/neovim/neovim.git
synced 2024-12-31 17:13:26 -07:00
42333ea98d
- eval.lua is now the source of truth. - Formatting is much more consistent. - Fixed Lua type generation for polymorphic functions (get(), etc). - Removed "Overview" section from builtin.txt - Can generate this if we really want it. - Moved functions from sign.txt and testing.txt into builtin.txt. - Removed the *timer* *timers* tags since libuv timers via vim.uv should be preferred. - Removed the temp-file-name tag from tempname() - Moved lueval() from lua.txt to builtin.txt. * Fix indent * fixup! * fixup! fixup! * fixup! better tag formatting * fixup: revert changes no longer needed * fixup! CI --------- Co-authored-by: zeertzjq <zeertzjq@outlook.com>
59 lines
1.8 KiB
Plaintext
59 lines
1.8 KiB
Plaintext
*testing.txt* Nvim
|
|
|
|
|
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
|
|
|
|
|
Testing Vim and Vim script *testing-support*
|
|
|
|
Expression evaluation is explained in |eval.txt|. This file goes into details
|
|
about writing tests in Vim script. This can be used for testing Vim itself
|
|
and for testing plugins.
|
|
|
|
1. Testing Vim |testing|
|
|
2. Test functions |test-functions-details|
|
|
3. Assert functions |assert-functions-details|
|
|
|
|
==============================================================================
|
|
1. Testing Vim *testing*
|
|
|
|
Vim can be tested after building it, usually with "make test".
|
|
The tests are located in the directory "src/testdir".
|
|
|
|
*new-style-testing*
|
|
New tests should be added as new style tests. The test scripts are named
|
|
test_<feature>.vim (replace <feature> with the feature under test). These use
|
|
functions such as |assert_equal()| to keep the test commands and the expected
|
|
result in one place.
|
|
|
|
Find more information in the file src/testdir/README.txt.
|
|
|
|
==============================================================================
|
|
2. Test functions *test-functions-details*
|
|
|
|
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.
|
|
|
|
==============================================================================
|
|
3. Assert functions *assert-functions-details*
|
|
|
|
See:
|
|
- |assert_beeps()|
|
|
- |assert_equal()|
|
|
- |assert_equalfile()|
|
|
- |assert_exception()|
|
|
- |assert_fails()|
|
|
- |assert_false()|
|
|
- |assert_inrange()|
|
|
- |assert_match()|
|
|
- |assert_nobeep()|
|
|
- |assert_notequal()|
|
|
- |assert_notmatch()|
|
|
- |assert_report()|
|
|
- |assert_true()|
|
|
|
|
vim:tw=78:ts=8:noet:ft=help:norl:
|