robin/laufey

tiny neovim fork for cozy coding

git clone https://git.robinwobin.dev/robin/laufey

robinmerge: 1dc9728daa1d8a2702

master
4 folders261 files

files

crash/
pyxfile/
samples/
sautest/autoload/
Make_all.mak50 B
Makefile4.7 KiB
README.txt3.9 KiB
check.vim8.0 KiB
dotest.in133 B
gen_opt_test.vim24.1 KiB
load.vim723 B
mouse.vim2.4 KiB
runnvim.sh2.2 KiB
runnvim.vim1.8 KiB
runtest.vim20.3 KiB
screendump.vim39 B
script_util.vim2.3 KiB
setup.vim3.1 KiB
shared.vim10.9 KiB
suite.sh185 B
summarize.vim1.9 KiB
term_util.vim272 B
test.sh1.9 KiB
test1.in387 B
test1.ok15 B
test_alot.vim1023 B
test_arabic.vim17.2 KiB
test_arglist.vim20.4 KiB
test_assert.vim16.9 KiB
test_autochdir.vim3.2 KiB
test_autocmd.vim159.2 KiB
test_autoload.vim576 B
test_backspace_opt.vim4.1 KiB
test_backup.vim2.3 KiB
test_blob.vim25.2 KiB
test_blockedit.vim3.8 KiB
test_breakindent.vim32.5 KiB
test_buffer.vim25.1 KiB
test_bufline.vim9.0 KiB
test_bufwintabinfo.vim6.0 KiB
test_cd.vim11.6 KiB
test_cdo.vim5.3 KiB
test_changedtick.vim2.5 KiB
test_changelist.vim2.9 KiB
test_charsearch.vim2.6 KiB
test_charsearch_utf8.vim781 B
test_checkpath.vim3.3 KiB
test_cindent.vim71.3 KiB
test_cjk_linebreak.vim2.8 KiB
test_close_count.vim3.4 KiB
test_cmdline.vim201.6 KiB
test_cmdmods.vim2.2 KiB
test_cmdwin.vim7.9 KiB
test_codestyle.vim4.1 KiB
test_command_count.vim4.8 KiB
test_comments.vim6.0 KiB
test_comparators.vim173 B
test_compiler.vim30.5 KiB
test_conceal.vim23.0 KiB
test_const.vim8.3 KiB
test_cpoptions.vim21.8 KiB
test_crash.vim8.3 KiB
test_cursor_func.vim19.2 KiB
test_cursorline.vim13.2 KiB
test_curswant.vim2.0 KiB
test_debugger.vim49.8 KiB
test_delete.vim4.0 KiB
test_diffmode.vim109.3 KiB
test_digraph.vim21.2 KiB
test_display.vim22.0 KiB
test_edit.vim75.3 KiB
test_environ.vim2.5 KiB
test_erasebackword.vim840 B
test_escaped_glob.vim1.1 KiB
test_eval_stuff.vim14.9 KiB
test_ex_equal.vim788 B
test_ex_mode.vim13.2 KiB
test_ex_undo.vim367 B
test_ex_z.vim3.1 KiB
test_excmd.vim26.8 KiB
test_exec_while_if.vim862 B
test_execute_func.vim6.3 KiB
test_exists.vim11.6 KiB
test_exists_autocmd.vim868 B
test_exit.vim4.3 KiB
test_expand.vim6.8 KiB
test_expand_func.vim4.4 KiB
test_expr.vim37.2 KiB
test_expr_utf8.vim1.7 KiB
test_file_perm.vim1004 B
test_file_size.vim1.6 KiB
test_filechanged.vim8.1 KiB
test_filecopy.vim1.9 KiB
test_fileformat.vim8.0 KiB
test_filetype.vim121.6 KiB
test_filter_cmd.vim5.8 KiB
test_filter_map.vim16.3 KiB
test_find_complete.vim5.6 KiB
test_findfile.vim28.3 KiB
test_fixeol.vim2.8 KiB
test_flatten.vim4.0 KiB
test_float_func.vim14.8 KiB
test_fnameescape.vim630 B
test_fnamemodify.vim5.0 KiB
test_fold.vim53.2 KiB
test_format.vim24.9 KiB
test_functions.vim139.8 KiB
test_ga.vim1.8 KiB
test_getcwd.vim3.2 KiB
test_getvar.vim6.2 KiB
test_gf.vim10.2 KiB
test_glob2regpat.vim1.4 KiB
test_global.vim3.6 KiB
test_gn.vim5.5 KiB
test_goto.vim7.6 KiB
test_gui.vim2.9 KiB
test_help.vim8.7 KiB
test_help_tagjump.vim8.4 KiB
test_hide.vim2.4 KiB
test_highlight.vim28.9 KiB
test_history.vim10.3 KiB
test_hlsearch.vim3.0 KiB
test_increment.vim24.2 KiB
test_increment_dbcs.vim670 B
test_indent.vim10.9 KiB
test_input.vim3.3 KiB
test_ins_complete.vim226.8 KiB
test_ins_complete_no_halt.vim1.8 KiB
test_interrupt.vim671 B
test_join.vim9.9 KiB
test_jumplist.vim5.4 KiB
test_lambda.vim7.2 KiB
test_langmap.vim2.2 KiB
test_largefile.vim755 B
test_let.vim21.0 KiB
test_lineending.vim438 B
test_lispindent.vim3.5 KiB
test_listchars.vim26.1 KiB
test_listdict.vim49.4 KiB
test_listlbr.vim11.8 KiB
test_listlbr_utf8.vim13.3 KiB
test_makeencoding.py1.9 KiB
test_makeencoding.vim2.9 KiB
test_map_functions.vim18.7 KiB
test_mapping.vim51.1 KiB
test_marks.vim9.0 KiB
test_match.vim15.2 KiB
test_matchadd_conceal.vim14.8 KiB
test_matchadd_conceal_utf8.vim1.0 KiB
test_matchfuzzy.vim21.3 KiB
test_menu.vim23.7 KiB
test_messages.vim29.4 KiB
test_method.vim6.1 KiB
test_mksession.vim40.6 KiB
test_mksession_utf8.vim3.0 KiB
test_modeline.vim18.4 KiB
test_move.vim1.8 KiB
test_nested_function.vim1.3 KiB
test_normal.vim121.4 KiB
test_number.vim8.9 KiB
test_options.vim104.3 KiB
test_options_all.vim309 B
test_packadd.vim18.3 KiB
test_partial.vim11.9 KiB
test_paste.vim1.5 KiB
test_perl.vim8.2 KiB
test_plugin_ccomplete.vim3.7 KiB
test_plugin_matchit.vim2.1 KiB
test_plugin_matchparen.vim6.2 KiB
test_plugin_netrw.vim29.0 KiB
test_plugin_phpcomplete.vim1.3 KiB
test_plugin_python3complete.vim8.4 KiB
test_plugin_tar.vim9.8 KiB
test_plugin_termdebug.vim21.3 KiB
test_plugin_tutor.vim1.4 KiB
test_plugin_zip.vim7.2 KiB
test_plus_arg_edit.vim1.3 KiB
test_popup.vim69.7 KiB
test_preview.vim2.2 KiB
test_profile.vim25.9 KiB
test_prompt_buffer.vim11.4 KiB
test_put.vim10.2 KiB
test_python3.vim151.8 KiB
test_pyx3.vim1.9 KiB
test_quickfix.vim203.2 KiB
test_quotestar.vim4.6 KiB
test_random.vim1.6 KiB
test_recover.vim15.3 KiB
test_regex_char_classes.vim13.4 KiB
test_regexp_latin.vim48.3 KiB
test_regexp_utf8.vim27.8 KiB
test_registers.vim31.7 KiB
test_reltime.vim907 B
test_rename.vim3.5 KiB
test_retab.vim7.6 KiB
test_ruby.vim13.0 KiB
test_scriptnames.vim3.4 KiB
test_scroll_opt.vim67.0 KiB
test_scrollbind.vim7.7 KiB
test_search.vim70.3 KiB
test_search_stat.vim20.4 KiB
test_searchpos.vim910 B
test_selectmode.vim9.9 KiB
test_set.vim1.1 KiB
test_sha256.vim1.6 KiB
test_shell.vim9.9 KiB
test_shift.vim23.6 KiB
test_signals.vim6.4 KiB
test_signs.vim79.4 KiB
test_sleep.vim773 B
test_smartindent.vim3.6 KiB
test_sort.vim25.5 KiB
test_source.vim15.5 KiB
test_source_utf8.vim1.5 KiB
test_spell.vim50.8 KiB
test_spell_utf8.vim25.8 KiB
test_spellfile.vim47.8 KiB
test_spellrare.vim1.4 KiB
test_stacktrace.vim3.8 KiB
test_startup.vim42.8 KiB
test_startup_utf8.vim2.6 KiB
test_stat.vim5.4 KiB
test_statusline.vim24.6 KiB
test_substitute.vim45.1 KiB
test_swap.vim15.9 KiB
test_syn_attr.vim2.5 KiB
test_syntax.vim31.3 KiB
test_system.vim5.0 KiB
test_tab.vim2.4 KiB
test_tabline.vim6.3 KiB
test_tabpage.vim29.1 KiB
test_tagcase.vim2.0 KiB
test_tagfunc.vim20.4 KiB
test_tagjump.vim46.4 KiB
test_taglist.vim9.5 KiB
test_termcodes.vim33.0 KiB
test_textformat.vim28.3 KiB
test_textobjects.vim20.4 KiB
test_timers.vim11.9 KiB
test_true_false.vim4.7 KiB
test_trycatch.vim51.6 KiB
test_undo.vim30.0 KiB
test_uniq.vim14.6 KiB
test_unlet.vim1.7 KiB
test_user_func.vim25.2 KiB
test_usercommands.vim29.2 KiB
test_utf8.vim12.7 KiB
test_utf8_comparisons.vim3.8 KiB
test_vartabs.vim15.5 KiB
test_version.vim570 B
test_viminfo.vim753 B
test_vimscript.vim193.3 KiB
test_virtualedit.vim20.4 KiB
test_visual.vim100.2 KiB
test_winbuf_close.vim5.6 KiB
test_window_cmd.vim66.7 KiB
test_window_id.vim3.5 KiB
test_windows_home.vim3.2 KiB
test_winfixbuf.vim78.8 KiB
test_wnext.vim2.4 KiB
test_wordcount.vim3.3 KiB
test_writefile.vim29.7 KiB
unix.vim386 B
view_util.vim1.4 KiB
vim9.vim7.4 KiB
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.

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.

At 4), to run a test in GUI, add "GUI_FLAG=-g" to the make command.


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"

- The following environment variables are recognized and can be set to
  influence the behavior of the test suite (see runtest.vim for details)

  - $TEST_MAY_FAIL=Test_channel_one    - ignore those failing tests
  - $TEST_FILTER=Test_channel    - only run test that match this pattern
  - $TEST_SKIP_PAT=Test_channel  - skip tests that match this pattern
  - $TEST_NO_RETRY=yes           - do not try to re-run failing tests
  You can also set them in Vim:
    :let $TEST_MAY_FAIL = 'Test_channel_one'
    :let $TEST_FILTER = '_set_mode'
    :let $TEST_SKIP_PAT = 'Test_loop_forever'
    :let $TEST_NO_RETRY = 'yes'
  Use an empty string to revert, e.g.:
    :let $TEST_FILTER = ''

- 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".


OLD STYLE TESTS:

There are a few tests that are used when Vim was built without the +eval
feature.  These cannot use the "assert" functions, therefore they consist of a
.in file that contains Normal mode commands between STARTTEST and ENDTEST.
They modify the file and the result gets written in the test.out file.  This
is then compared with the .ok file.  If they are equal the test passed.  If
they differ the test failed.


RUNNING THE TESTS:

To run a single test from the src directory:

    $ make test_<name>

The below commands should be run from the src/testdir directory.

To run a single test:

    $ make test_<name>.res

The file 'messages' contains the messages generated by the test script.  If a
test fails, then the test.log file contains the error messages.  If all the
tests are successful, then this file will be an empty file.

- To run a single test function from a test script:

    $ ../vim -u NONE -S runtest.vim <test_file>.vim <function_name>

- To execute only specific test functions, add a second argument:

	 $ ../vim -u NONE -S runtest.vim test_channel.vim open_delay


- To run all the tests:

    $ make

- To run the test on MS-Windows using the MSVC nmake:

    > nmake -f Make_dos.mak

- To run the tests with GUI Vim:

    $ make GUI_FLAG=-g

    or

    $ make VIMPROG=../gvim

- To cleanup the temporary files after running the tests:

    $ make clean