A code coverage tool for Vim script
Project description
Primula is a code coverage tool for Vim script.
Installation
$ pip install primula
Requirements
Python 3.8+
coverage 5.0+
Vim 7.4+
Usage
run
$ primula run vim --clean -Nnu vimrc -S /path/to/script.vim -c q
$ primula report -m
The contents of vimrc as follow:
if $PROFILE !=# ''
execute 'profile start' $PROFILE
profile! file ./*
endif
combine
$ vim --clean -Nn --cmd "profile start profile.txt" --cmd "profile! file ./*" -S /path/to/script.vim -c q
$ primula combine profile.txt
$ primula report -m
Configuration
.coveragerc
[primula]
environ = PROFILE
profile = profile.txt
- cond
It controls whether following condition commands to be included as statements.
:elsei[f]
:cat[ch]
:fina[lly]
They are counted by Vim 8.1.309+.
Default: True
- end
It controls whether following end commands to be included as statements.
:en[dif]
:endw[hile]
:endfo[r]
:endt[ry]
:endf[unction]
Default: False
- environ
An environment variable name.
Default: PROFILE
- profile
A profile output path.
Default: profile.txt
License
Primula is distributed under the terms of the Apache License, Version 2.0.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file primula-0.2.tar.gz
.
File metadata
- Download URL: primula-0.2.tar.gz
- Upload date:
- Size: 26.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da92c8567232138a44c0258ef2560016c7fceb4dff8d9e0d8e0f4edc4c424ffc |
|
MD5 | bf12b1cbf15b89a0bc6c5cb9f42eec9c |
|
BLAKE2b-256 | a4f579d0e0ce5d5cb48d6c1e4c0567b8572641783b5db1f87c3012f2e43b704f |
File details
Details for the file primula-0.2-py3-none-any.whl
.
File metadata
- Download URL: primula-0.2-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ceab1eae175525fbd4cdd5d8a008f4ba85523aa526fabd8c0079c47ea594bf67 |
|
MD5 | b148fada867e10a35ff993241bf363a6 |
|
BLAKE2b-256 | db1461f1c5736fcf6883220c72f58888cc393d74e74564623b114664b876b214 |