.. | ||
.coveragerc | ||
.gitignore | ||
.themisrc | ||
README.md | ||
test_default.vimspec | ||
test_hooks.vimspec | ||
test_jump.vimspec | ||
test_matchit.vimspec | ||
test_resolve.vimspec | ||
test_syntax.vimspec |
Prerequisites
Python is requried to take code coverage.
How to run unit tests
This repository uses vim-themis to run unit tests.
Clone vim-themis in your local
git clone https://github.com/thinca/vim-themis.git
Run vim-flavor
command via bundle exec
:
Execute themis
command to run all unit tests
cd /path/to/conflict-marker.vim/test
/path/to/vim-themis/bin/themis *.vimspec
It runs all unit tests and outputs the results in terminal.
How to take code coverage
This repository uses covimerage to take code coverage.
Install covimerage in ./venv
directory.
python -m venv venv
source ./venv/bin/activate
pip install covimerage
covimerage --version
Run unit tests enabling profiling by setting PROFILE_LOG
environment variable.
cd /path/to/conflict-marker.vim/test
PROFILE_LOG=profile.txt /path/to/vim-themis/bin/themis *.vimspec
It saves profiling results to profile.txt
. Extract code coverage data from it using covimerage
.
covimerage write_coverage profile.txt
Output code coverage results with coverage
command which is part of standard Python toolchain.
# Show code coverage results in terminal
coverage report
# Output coverage data to XML file
coverage xml