vimwiki/test
2019-12-20 20:40:43 -07:00
..
independent_runs Merge tinmarino-dev_vader. Add new vader tests. 2019-12-14 21:44:19 -07:00
resources Merge tinmarino-dev_vader. Add new vader tests. 2019-12-14 21:44:19 -07:00
vader_includes Merge tinmarino-dev_vader. Add new vader tests. 2019-12-14 21:44:19 -07:00
command_generate_links.vader Merge tinmarino-dev_vader. Add new vader tests. 2019-12-14 21:44:19 -07:00
command_generate_tags.vader Merge tinmarino-dev_vader. Add new vader tests. 2019-12-14 21:44:19 -07:00
command_goto.vader Feature: VimwikiGoto completion works with only part of filename 2019-12-15 02:27:11 -03:00
command_toc.vader Merge tinmarino-dev_vader. Add new vader tests. 2019-12-14 21:44:19 -07:00
link_creation.vader Move helper files so they don't get run with test/* 2019-07-20 22:12:07 -06:00
link_markdown_multiple_per_file.vader Test: Add vader tests for fixing going back links on same file 2019-10-28 19:14:50 +01: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 'VimwikiReturn 3 5' behavior within code blocks. 2019-08-23 14:42:07 -06:00
README.md Cleanup, add link to vim-testbed on DockerHub 2019-12-20 20:40:43 -07:00
run_tests.sh Modify how tests are run to improve overall speed. 2019-12-14 10:41:22 -07:00
syntax.vader Merge tinmarino-dev_vader. Add new vader tests. 2019-12-14 21:44:19 -07:00
table_autoformat.vader Merge tinmarino-dev_vader. Add new vader tests. 2019-12-14 21:44:19 -07:00
tabnext_delay.vader Move helper files so they don't get run with test/* 2019-07-20 22:12:07 -06:00
vimrc Merge tinmarino-dev_vader. Add new vader tests. 2019-12-14 21:44:19 -07: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.

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