testing.txt 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. *testing.txt* Nvim
  2. VIM REFERENCE MANUAL by Bram Moolenaar
  3. Testing Vim and Vim script *testing-support*
  4. Expression evaluation is explained in |eval.txt|. This file goes into details
  5. about writing tests in Vim script. This can be used for testing Vim itself
  6. and for testing plugins.
  7. 1. Testing Vim |testing|
  8. 2. Test functions |test-functions-details|
  9. 3. Assert functions |assert-functions-details|
  10. ==============================================================================
  11. 1. Testing Vim *testing*
  12. Vim can be tested after building it, usually with "make test".
  13. The tests are located in the directory "src/testdir".
  14. *new-style-testing*
  15. New tests should be added as new style tests. The test scripts are named
  16. test_<feature>.vim (replace <feature> with the feature under test). These use
  17. functions such as |assert_equal()| to keep the test commands and the expected
  18. result in one place.
  19. Find more information in the file src/testdir/README.txt.
  20. ==============================================================================
  21. 2. Test functions *test-functions-details*
  22. See |test_garbagecollect_now()|.
  23. ==============================================================================
  24. 3. Assert functions *assert-functions-details*
  25. See:
  26. - |assert_beeps()|
  27. - |assert_equal()|
  28. - |assert_equalfile()|
  29. - |assert_exception()|
  30. - |assert_fails()|
  31. - |assert_false()|
  32. - |assert_inrange()|
  33. - |assert_match()|
  34. - |assert_nobeep()|
  35. - |assert_notequal()|
  36. - |assert_notmatch()|
  37. - |assert_report()|
  38. - |assert_true()|
  39. vim:tw=78:ts=8:noet:ft=help:norl: