vimwiki/test
Tinmarino c9ba53e204 Refractor: Path Add utility unixify #478
Basically unixify all before workingm then transofom in function os os

Util: Add function sort_len that a list of string according to the lenght of its content
Fix: VimwikiRenameLink doesn't update links in diary #90
Test: VimwikiRenameLink with nested directories
Prettify comments in autoload/path + remove antipattern
Define osxify function helper to solve windows Vs Unix : see #478
Path: remove useless temporary fix convertion before calling relpath (redundant) : see #478
Test: Fix typo
Path corrected (Thanks to test)
2020-07-25 03:51:02 -04:00
..
independent_runs Clean & Fix: cycle_bullets bug not defined key in dic: #911 2020-06-16 13:46:56 -04:00
resources Add Vader tests for RSS feed generation 2020-07-22 10:06:30 -04:00
vader_includes Clean & Fix: cycle_bullets bug not defined key in dic: #911 2020-06-16 13:46:56 -04:00
command_generate_links.vader Set default list_margin=0 for markdown 2019-12-21 09:09:16 -07:00
command_generate_tags.vader Prepare for release 2.5 2020-05-26 23:09:58 +02:00
command_goto.vader Test: VimwikiTableMoveColumnLeft and some friends 2020-07-24 00:16:09 -04:00
command_rename_link.vader Refractor: Path Add utility unixify #478 2020-07-25 03:51:02 -04:00
command_toc.vader Test: add issue non-regession and todo list 2020-06-04 17:29:47 -04:00
convert_default_html.vader Test: plaintext html magic 2020-04-18 14:10:05 -04:00
diary_rss_feed.vader Add Vader tests for RSS feed generation 2020-07-22 10:06:30 -04:00
html_blockquote.vader Add test for arrow blockquotes 2020-07-22 00:41:36 -04:00
issue_markdown.vader Test: 1/Fix some interdependencies 2/replace -o -> -f 2020-07-25 02:05:59 -04:00
link_creation.vader Refactor: normalize_link_v, creating u#get_selection (Fix #382) 2020-07-24 17:59:54 -04:00
link_markdown_multiple_per_file.vader Fix relative paths for VimwikiRenameLink. Merge PR #787. 2020-01-04 21:21:52 -07:00
list_clean.vader Functions to remove all todo items that are done (#906) 2020-06-08 14:31:35 +02:00
list_margin.vader Don't overwrite user setting of list_margin. 2019-12-23 13:35:31 -07:00
list_todo.vader Test: add issue non-regession and todo list 2020-06-04 17:29:47 -04:00
list_update.vader Fix off-by-one error in get_next_line and get_prev_line 2019-07-31 17:56:08 +01:00
list_VimwikiReturn.vader Fix relative paths for VimwikiRenameLink. Merge PR #787. 2020-01-04 21:21:52 -07:00
README.md Test: 1/Fix some interdependencies 2/replace -o -> -f 2020-07-25 02:05:59 -04:00
run_tests.sh Test: 1/Fix some interdependencies 2/replace -o -> -f 2020-07-25 02:05:59 -04:00
syntax.vader Disable syntax for indented code blocks. 2020-01-08 06:03:40 -07:00
table_autoformat.vader Test: VimwikiTableMoveColumnLeft and some friends 2020-07-24 00:16:09 -04:00
tabnext_delay.vader Test: comment non working -> All tests green 2020-05-13 11:35:22 -04:00
vimrc Add Vader tests for RSS feed generation 2020-07-22 10:06:30 -04:00

Vimwiki Tests

This directory contains a test framework used to automatically test/verify Vimwiki functionality. It is based on the following tools:

Resources

Building Docker Image

To build the Docker image run docker build -t vimwiki . from the Vimwiki repository root (same location as the Dockerfile).

Running Tests

Manual Steps

Starting in the test directory run this command:

docker run -it --rm -v $PWD/../:/testplugin -v $PWD/../test:/home vimwiki vim_7.4.1099 -u test/vimrc -i NONE

This will open a vim instance in the docker container and then all tests can be run with :Vader test/* or individual tests can be run.

Note: Substitute vim_7.4.1099 for any of the vim versions in the Dockerfile.

Automated Tests

The script in the test/ directory named run_test.sh can be used to automatically run all tests for all installed vim versions. The vim/nvim versions are parsed from the Dockerfile. This script will also run Vint for all plugin source files. For more information run ./run_tests.sh -h.

Writing Tests

You are advice to write tests at the top of the file where you want to include it because some Execute can have some side effect making it hard to debug

Inside the container

  • $USER -> vimtest : unprivileged => very hard to mess up things
  • $HOME -> /home/vimtest : but it is readonly !
  • $PWD -> /testplugin : mapped to vimwiki plugin root directory

For more information, read the base docker image

Known Issues

  1. neovim v0.2.x does not work correctly with Vader output from the docker container. No test results are printed and an error message saying Vim: Error reading input, exiting...
    • Probably need to look into this more and determine if the issue is Vader, Neovim, or Docker.
  2. Vader does not play nice with the location list. Tests that use the location list should be placed in independent_runs/.

Notable Vim patches

  • v7.3.831 getbufvar added a default value
  • v7.4.236 add ability to check patch with has("patch-7.4.123")
  • v7.4.279 added the option to for globpath() to return a list
  • v7.4.1546 sticky type checking removed (allow a variables type to change)
  • v7.4.1989 filter() accepts a Funcref
  • v7.4.2044 lambda support added - see :h expr-lambda
  • v7.4.2120 Added function "closure" argument
  • v7.4.2137 add funcref()
  • v8.0 async jobs and timers