vimwiki/test
2020-08-12 09:12:17 -04:00
..
independent_runs Test: remove vader_setup and vader_teardon 2020-08-12 09:12:17 -04:00
resources Test: Add local testing (no docker need), working on windows 2020-07-26 00:00:23 -04:00
config_commentstring.vader Test: Refactor: Normalize names and behavior 2020-08-09 16:13:53 -04:00
file_goto.vader Test: Refactor: Normalize names and behavior 2020-08-09 16:13:53 -04:00
file_system.vader Test: Refactor: Normalize names and behavior 2020-08-09 16:13:53 -04:00
html_blockquote.vader Refactor: Test & Doc: Remove test/vader_include and move DesignNotes to doc 2020-07-29 23:29:03 -04:00
html_convert_default.vader Test: Refactor: Normalize names and behavior 2020-08-09 16:13:53 -04:00
html_diary_rss_feed.vader Test: Refactor: Normalize names and behavior 2020-08-09 16:13:53 -04:00
issue_markdown.vader Test: Refactor: Normalize names and behavior 2020-08-09 16:13:53 -04:00
issue_profile_tabnext.vader Test: Refactor: Normalize names and behavior 2020-08-09 16:13:53 -04:00
link_anchor.vader Test: Refactor: Normalize names and behavior 2020-08-09 16:13:53 -04:00
link_creation.vader Test: Refactor: Normalize names and behavior 2020-08-09 16:13:53 -04:00
link_generation.vader Test: Refactor: Normalize names and behavior 2020-08-09 16:13:53 -04:00
link_renaming.vader Test: Refactor: Normalize names and behavior 2020-08-09 16:13:53 -04:00
link_toc.vader Test: Refactor: Normalize names and behavior 2020-08-09 16:13:53 -04:00
list_clean.vader Refactor: Test & Doc: Remove test/vader_include and move DesignNotes to doc 2020-07-29 23:29:03 -04:00
list_margin.vader Refactor: Test & Doc: Remove test/vader_include and move DesignNotes to doc 2020-07-29 23:29:03 -04:00
list_move.vader Syntax: Stricter typeface and fix preCode (alias inline) nested in bold 2020-08-12 01:37:27 -04:00
list_return.vader Test: Refactor: Normalize names and behavior 2020-08-09 16:13:53 -04:00
list_todo.vader Refactor: Test & Doc: Remove test/vader_include and move DesignNotes to doc 2020-07-29 23:29:03 -04:00
list_update.vader Refactor: Test & Doc: Remove test/vader_include and move DesignNotes to doc 2020-07-29 23:29:03 -04:00
README.md Test: 1/Fix some interdependencies 2/replace -o -> -f 2020-07-25 02:05:59 -04:00
run_tests.sh Test: Refactor: Normalize names and behavior 2020-08-09 16:13:53 -04:00
syntax.vader Syntax: Stricter typeface and fix preCode (alias inline) nested in bold 2020-08-12 01:37:27 -04:00
table_autoformat.vader Refactor: Test & Doc: Remove test/vader_include and move DesignNotes to doc 2020-07-29 23:29:03 -04:00
tag.vader Config: Permit tag configuration for syntax, search and match (Issue #922 #928) 2020-08-08 04:06:20 -04:00
vimrc Syntax: Stricter typeface and fix preCode (alias inline) nested in bold 2020-08-12 01:37:27 -04:00
z_success.vader Test: Add local testing (no docker need), working on windows 2020-07-26 00:00:23 -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