To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!More about adding a collaborator
Testing vim plugins
- Write tests for your Vim plugin with
vim-vspec. 2. Declare dependencies of your Vim plugin as a flavorfile, and
save it as
Flavorfilein the root of your Vim plugin.
It is hard to test Vim plugins, because there are a few problems:
- It is hard to write readable and maintainable test code in Vim script, even for skilled users. Because Vim script is not expressive as other script languages like Ruby.
- Each test must be run in an isolated environment to guarantee the same results for every time and everywhere. So that all settings including vimrc and plugins of yours must be ignored. Your viminfo also must not be read and written to avoid unexpected test failures and unexpectedly overwritten of registers and marks you used.
- Some plugins require other plugins at runtime. Such dependencies must be
resolved, but they must be installed into a temporary place to avoid
corrupting your environment. And
'runtimepath'must be configured carefully for both dependencies and plugins under development.
Therefore it is hard to do right testing for Vim plugins from scratch. As
a lazy Vim user, I want to abstract all of the complexity.
Fortunately, the problems can be solved partially with
vim-vspec, a testing framework for Vim
script. It provides a DSL based on Vim script to write readable test code.
It provides also a driver script to run tests. The driver script hides
details about the isolation of Vim processes and
However, vim-vspec is a tool to write tests, not a tool to set up environment
to test. So that it does nothing about dependencies. And it is painful to
manage dependencies by hand. But it is easy with vim-flavor. The complexity
can be hidden by combining both tools. That's why vim-flavor is integrated
Last published 11 months ago by kana.