dotfiles/.vim/pack/plugins/start/vim-conflict-marker/test
2024-12-15 14:45:59 +01:00
..
.coveragerc Update 2024-12-15 14:45 OpenBSD/amd64-t14 2024-12-15 14:45:59 +01:00
.gitignore Update 2024-12-15 14:45 OpenBSD/amd64-t14 2024-12-15 14:45:59 +01:00
.themisrc Update 2024-12-15 14:45 OpenBSD/amd64-t14 2024-12-15 14:45:59 +01:00
README.md Update 2024-12-15 14:45 OpenBSD/amd64-t14 2024-12-15 14:45:59 +01:00
test_default.vimspec Update 2024-12-15 14:45 OpenBSD/amd64-t14 2024-12-15 14:45:59 +01:00
test_hooks.vimspec Update 2024-12-15 14:45 OpenBSD/amd64-t14 2024-12-15 14:45:59 +01:00
test_jump.vimspec Update 2024-12-15 14:45 OpenBSD/amd64-t14 2024-12-15 14:45:59 +01:00
test_matchit.vimspec Update 2024-12-15 14:45 OpenBSD/amd64-t14 2024-12-15 14:45:59 +01:00
test_resolve.vimspec Update 2024-12-15 14:45 OpenBSD/amd64-t14 2024-12-15 14:45:59 +01:00
test_syntax.vimspec Update 2024-12-15 14:45 OpenBSD/amd64-t14 2024-12-15 14:45:59 +01:00

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