2021-04-22 18:07:06 -07:00
|
|
|
*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*
|
2022-12-02 22:48:51 -07:00
|
|
|
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.
|
2021-04-22 18:07:06 -07:00
|
|
|
|
|
|
|
Find more information in the file src/testdir/README.txt.
|
|
|
|
|
|
|
|
==============================================================================
|
|
|
|
2. Test functions *test-functions-details*
|
|
|
|
|
2023-08-09 02:06:13 -07:00
|
|
|
See |test_garbagecollect_now()|.
|
2021-04-22 18:07:06 -07:00
|
|
|
|
|
|
|
==============================================================================
|
|
|
|
3. Assert functions *assert-functions-details*
|
|
|
|
|
2023-07-28 06:48:41 -07:00
|
|
|
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()|
|
2021-04-22 18:07:06 -07:00
|
|
|
|
|
|
|
vim:tw=78:ts=8:noet:ft=help:norl:
|