0.1.0 • Published 4 years ago
lcov.sh v0.1.0
LCOV.SH
The best LCOV framework around a BASH project
Requirements
Installation
Download lcov.sh
file into your local machine
curl -sL https://git.io/lcov.sh
Install lcov
package into your system
apt install lcov
Check if it working
bash lcov.sh -v
Usage
Add the following code [[ -z "${LCOV_DEBUG}" ]] || set -x
on top of source file you want in a coverage report, see below example:
#!/usr/bin/env bash
[[ -z "${LCOV_DEBUG}" ]] || set -x
welcome () {
echo "Hi $1, I'm testable code"
}
welcome "John"
Now, run from command line the following command:
lcov.sh FILE...
Testing
TL;DR
not now :-)
Short url
curl -i "https://git.io" \
-d "url=https://raw.githubusercontent.com/javanile/lcov.sh/master/lcov.sh" \
-d "code=lcov.sh"
Install lcov
package
Debian/Ubuntu
apt install lcov
Mac OSX
brew install lcov
See Also
0.1.0
4 years ago