Unit testing framework for vimscript.
Java Vim script Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
autoload
bin
doc
src/java/vunit
test
.gitignore
Makefile
README.rst
build.xml

README.rst

VUnit provides a JUnit/PyUnit like unit test framework for vim scripts. Tests are written in vimscript and can be run at the command line using either a python test runner or using an ant task.

Here is an example test case that tests autoindent with tab expansion in a vim file:

function SetUp()
  set expandtab shiftwidth=2 tabstop=2
endfunction

function TestTabExpand()
  set ft=vim
  call append(0, ['if 1', 'endif'])
  call cursor(1, 1)
  normal oecho 'test'
  call vunit#AssertEquals(getline(2), "  echo 'test'")
endfunction

See the vim help file for full documentation.