Skip to content

mbedna/vunit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Unit testing framework for vimscript.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 58.1%
  • Vim Script 29.1%
  • Python 10.0%
  • Shell 2.8%