Skip to content
Branch: master
Find file History
brammool patch 8.2.0140: CI does not test building doc tags
Problem:    CI does not test building doc tags.
Solution:   Add the vimtags/gcc build. Cleanup showing version. (Ozaki Kiichi,
            closes #5513)
Latest commit 2387773 Jan 21, 2020
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
dumps
python2 updated for version 7.3.1172 Jun 12, 2013
python3
python_after
python_before
pythonx
pyxfile
samples
sautest/autoload
Make_all.mak
Make_amiga.mak
Make_dos.mak
Make_ming.mak
Make_vms.mms
Makefile
README.txt patch 8.1.1048: minor issues with tests Mar 24, 2019
amiga.vim
bench_re_freeze.in
bench_re_freeze.vim
check.vim
color_ramp.vim
dos.vim
dotest.in
gen_opt_test.vim
gui_init.vim
gui_preinit.vim
lsan-suppress.txt
popupbounce.vim
runtest.vim
screendump.vim patch 8.1.1955: tests contain typos Sep 1, 2019
setup.vim
setup_gui.vim
shared.vim
silent.wav
summarize.vim
term_util.vim
test1.in
test1.ok
test42.in patch 8.1.2182: test42 seen as binary by git diff Oct 19, 2019
test42.ok
test44.in
test44.ok
test49.in patch 8.1.1382: error when editing test file May 24, 2019
test49.ok
test49.vim
test52.in
test52.ok updated for version 7.0001 Jun 13, 2004
test59.in
test59.ok
test70.in
test70.ok
test77a.com
test77a.in
test77a.ok
test83-tags2 updated for version 7.3.336 Oct 12, 2011
test83-tags3
test86.in
test86.ok patch 8.1.1346: error for Python exception does not show useful info May 18, 2019
test87.in
test87.ok
test99.in
test99.ok
test_alot.vim patch 8.2.0040: timers test is still flaky on Travis for Mac Dec 25, 2019
test_alot_latin.vim
test_alot_utf8.vim
test_arabic.vim
test_arglist.vim
test_assert.vim patch 8.1.2011: more functions can be used as methods Sep 8, 2019
test_autochdir.vim
test_autocmd.vim patch 8.2.0097: crash with autocommand and spellfile Jan 7, 2020
test_autoload.vim
test_backspace_opt.vim
test_backup.vim
test_balloon.vim
test_balloon_gui.vim
test_behave.vim
test_blob.vim
test_blockedit.vim
test_breakindent.vim
test_bufline.vim
test_bufwintabinfo.vim
test_cd.vim
test_cdo.vim
test_changedtick.vim
test_changelist.vim patch 8.1.1925: more functions can be used as methods Aug 24, 2019
test_channel.py
test_channel.vim patch 8.2.0138: memory leak when starting a job fails Jan 20, 2020
test_channel_pipe.py
test_channel_write.py
test_charsearch.vim
test_charsearch_utf8.vim
test_checkpath.vim
test_cindent.vim
test_clientserver.vim patch 8.1.1993: more functions can be used as methods Sep 6, 2019
test_close_count.vim
test_cmdline.vim
test_command_count.vim
test_comparators.vim
test_compiler.vim
test_conceal.vim patch 8.1.2421: test88 is old style Dec 11, 2019
test_const.vim
test_crypt.vim
test_cscope.vim
test_cursor_func.vim
test_cursorline.vim
test_curswant.vim patch 8.0.0861: still many old style tests Aug 4, 2017
test_debugger.vim
test_delete.vim
test_diffmode.vim
test_digraph.vim
test_display.vim
test_edit.vim
test_environ.vim
test_erasebackword.vim
test_escaped_glob.vim
test_eval.in
test_eval.ok
test_eval_func.vim
test_eval_stuff.vim
test_ex_equal.vim patch 8.1.0817: ":=" command is not tested Jan 24, 2019
test_ex_mode.vim
test_ex_undo.vim
test_ex_z.vim
test_excmd.vim
test_exec_while_if.vim
test_execute_func.vim
test_exists.vim patch 8.0.1186: still quite a few old style tests Oct 12, 2017
test_exists_autocmd.vim
test_exit.vim
test_expand.vim
test_expand_dllpath.vim
test_expand_func.vim
test_expr.vim patch 8.1.2282: crash when passing many arguments through a partial Nov 9, 2019
test_expr_utf8.vim
test_feedkeys.vim
test_file_perm.vim patch 8.1.1925: more functions can be used as methods Aug 24, 2019
test_file_size.vim patch 8.0.1200: tests switch the bell off twice Oct 15, 2017
test_filechanged.vim
test_fileformat.vim
test_filetype.vim
test_filter_cmd.vim
test_filter_map.vim
test_find_complete.vim
test_findfile.vim patch 8.1.2278: using "cd" with "exe" may fail Nov 9, 2019
test_fixeol.vim
test_float_func.vim
test_fnameescape.vim
test_fnamemodify.vim
test_fold.vim
test_functions.vim
test_ga.vim patch 8.1.0811: too many #ifdefs Jan 24, 2019
test_getcwd.vim patch 8.1.2278: using "cd" with "exe" may fail Nov 9, 2019
test_getvar.vim
test_gf.vim
test_glob2regpat.vim
test_global.vim
test_gn.vim
test_goto.vim patch 8.1.1585: :let-heredoc does not trim enough Jun 23, 2019
test_gui.vim
test_gui_init.vim
test_hardcopy.vim
test_help.vim
test_help_tagjump.vim
test_hide.vim patch 8.1.1888: more functions can be used as methods Aug 18, 2019
test_highlight.vim
test_history.vim patch 8.1.1953: more functions can be used as a method Aug 31, 2019
test_hlsearch.vim
test_iminsert.vim
test_increment.vim
test_increment_dbcs.vim patch 8.1.0811: too many #ifdefs Jan 24, 2019
test_ins_complete.vim
test_interrupt.vim
test_job_fails.vim
test_join.vim patch 8.2.0018: :join does not add white space where it should Dec 17, 2019
test_json.vim patch 8.1.1954: more functions can be used as a method Aug 31, 2019
test_jumplist.vim
test_jumps.vim patch 7.4.1970 Jul 1, 2016
test_lambda.vim
test_langmap.vim patch 8.1.1544: some balloon tests don't run when they can Jun 15, 2019
test_largefile.vim
test_let.vim
test_lineending.vim
test_lispwords.vim patch 8.1.1954: more functions can be used as a method Aug 31, 2019
test_listchars.vim
test_listdict.vim
test_listener.vim
test_listlbr.vim
test_listlbr_utf8.vim
test_lua.vim
test_makeencoding.py
test_makeencoding.vim patch 8.1.2373: cannot build with +popupwin but without +quickfix Dec 1, 2019
test_man.vim
test_maparg.vim
test_mapping.vim
test_marks.vim patch 8.2.0120: virtcol() does not check arguments to be valid Jan 15, 2020
test_match.vim
test_matchadd_conceal.vim
test_matchadd_conceal_utf8.vim
test_memory_usage.vim patch 8.2.0072: memory test still fails on Cirrus CI Jan 1, 2020
test_menu.vim
test_messages.vim
test_method.vim patch 8.1.2107: various memory leaks reported by asan Oct 1, 2019
test_mksession.vim
test_mksession_utf8.vim
test_modeline.vim
test_move.vim
test_nested_function.vim
test_netbeans.py
test_netbeans.vim
test_normal.vim
test_number.vim
test_options.vim
test_packadd.vim
test_partial.vim
test_paste.vim
test_perl.vim
test_plus_arg_edit.vim patch 8.1.0811: too many #ifdefs Jan 24, 2019
test_popup.vim
test_popupwin.vim
test_popupwin_textprop.vim
test_preview.vim
test_profile.vim
test_prompt_buffer.vim
test_put.vim
test_python2.vim
test_python3.vim
test_pyx2.vim
test_pyx3.vim
test_quickfix.vim
test_quotestar.vim
test_random.vim
test_recover.vim
test_regex_char_classes.vim
test_regexp_latin.vim
test_regexp_utf8.vim patch 8.2.0014: test69 and test95 are old style Dec 16, 2019
test_registers.vim
test_reltime.vim patch 8.1.1987: more functions can be used as methods Sep 4, 2019
test_rename.vim
test_restricted.vim
test_retab.vim patch 8.0.0206: test coverage for :retab insufficient Jan 17, 2017
test_ruby.vim patch 8.1.2166: rubyeval() not tested as a method Oct 16, 2019
test_scriptnames.vim
test_scroll_opt.vim
test_scrollbind.vim
test_search.vim
test_search_stat.vim
test_searchpos.vim
test_set.vim
test_sha256.vim
test_shift.vim patch 8.1.1841: no test for Ex shift commands Aug 12, 2019
test_short_sleep.py patch 8.0.0911: terminal test takes too long Aug 11, 2017
test_shortpathname.vim
test_signals.vim
test_signs.vim patch 8.2.0108: when sign text is changed a manual redraw is needed Jan 9, 2020
test_smartindent.vim
test_sort.vim
test_sound.vim
test_source.vim
test_source_utf8.vim
test_spell.vim
test_spellfile.vim
test_startup.vim patch 8.1.2373: cannot build with +popupwin but without +quickfix Dec 1, 2019
test_startup_utf8.vim
test_stat.vim patch 8.1.1941: getftype() test fails on Mac Aug 30, 2019
test_statusline.vim
test_substitute.vim
test_suspend.vim
test_swap.vim
test_syn_attr.vim
test_syntax.vim
test_system.vim
test_tab.vim
test_tabline.vim
test_tabpage.vim patch 8.2.0116: BufEnter autocmd not triggered on ":tab drop" Jan 13, 2020
test_tagcase.vim
test_tagfunc.vim patch 8.2.0088: insufficient tests for tags; bug in using extra tag f… Jan 5, 2020
test_tagjump.vim
test_taglist.vim
test_tcl.vim
test_termcodes.vim
test_termencoding.vim
test_terminal.vim patch 8.1.2364: termwinscroll test is flaky on FreeBSD Nov 30, 2019
test_terminal_fail.vim patch 8.1.1544: some balloon tests don't run when they can Jun 15, 2019
test_textformat.vim
test_textobjects.vim
test_textprop.vim
test_timers.vim
test_true_false.vim patch 8.1.1953: more functions can be used as a method Aug 31, 2019
test_trycatch.vim
test_undo.vim
test_unlet.vim
test_user_func.vim patch 8.1.1816: cannot use a user defined function as a method Aug 4, 2019
test_usercommands.vim
test_utf8.vim
test_utf8_comparisons.vim
test_vartabs.vim
test_viminfo.vim
test_vimscript.vim
test_virtualedit.vim
test_visual.vim
test_winbar.vim patch 8.1.1544: some balloon tests don't run when they can Jun 15, 2019
test_winbuf_close.vim
test_window_cmd.vim
test_window_id.vim
test_windows_home.vim
test_wnext.vim
test_wordcount.vim
test_writefile.vim
test_xxd.vim
unix.vim
view_util.vim
vms.vim patch 7.4.2031 Jul 12, 2016

README.txt

This directory contains tests for various Vim features.
For testing an indent script see runtime/indent/testdir/README.txt.

If it makes sense, add a new test method to an already existing file.  You may
want to separate it from other tests with comment lines.

The numbered tests are older, we have switched to named tests.  Don't add any
more numbered tests.

And then you can choose between a new style test, which is a Vim script, or an
old style test, which uses Normal mode commands.  Use a new style test if you
can.  Use an old style test when it needs to run without the +eval feature.


TO ADD A NEW STYLE TEST:

1) Create a test_<subject>.vim file.
2) Add test_<subject>.res to NEW_TESTS_RES in Make_all.mak in alphabetical
   order.
3) Also add an entry "test_<subject>" to NEW_TESTS in Make_all.mak.
4) Use make test_<subject> to run a single test.

At 2), instead of running the test separately, it can be included in
"test_alot".  Do this for quick tests without side effects.  The test runs a
bit faster, because Vim doesn't have to be started, one Vim instance runs many
tests.


What you can use (see test_assert.vim for an example):

- Call assert_equal(), assert_true(), assert_false(), etc.

- Use assert_fails() to check for expected errors.

- Use try/catch to avoid an exception aborts the test.

- Use test_alloc_fail() to have memory allocation fail.  This makes it possible
  to check memory allocation failures are handled gracefully.  You need to
  change the source code to add an ID to the allocation.  Add a new one to
  alloc_id_T, before aid_last.

- Use test_override() to make Vim behave differently, e.g.  if char_avail()
  must return FALSE for a while.  E.g. to trigger the CursorMovedI autocommand
  event. See test_cursor_func.vim for an example.

- If the bug that is being tested isn't fixed yet, you can throw an exception
  with "Skipped" so that it's clear this still needs work.  E.g.: throw
  "Skipped: Bug with <c-e> and popupmenu not fixed yet"

- See the start of runtest.vim for more help.


TO ADD A SCREEN DUMP TEST:

Mostly the same as writing a new style test.  Additionally, see help on
"terminal-dumptest".  Put the reference dump in "dumps/Test_func_name.dump".


TO ADD AN OLD STYLE TEST:

1) Create test_<subject>.in and test_<subject>.ok files.
2) Add test_<subject>.out to SCRIPTS_ALL in Make_all.mak in alphabetical order.
3) Use make test_<subject>.out to run a single test in src/testdir/.
   Use make test_<subject> to run a single test in src/.
4) Also add an entry in src/Makefile.

Keep in mind that the files are used as if everything was typed:
- To add comments use:   :"  (that's an Ex command comment)
- A line break is like pressing Enter.  If that happens on the last line
  you'll hear a beep!
You can’t perform that action at this time.