#!/usr/bin/env bash # ============================================================================ # Measure line coverage of a shell library from its test script, via kcov. # # shell_coverage.sh [min-percent] # # Reports covered/total and the uncovered line numbers, and exits 1 when the # result is below min-percent (default 100). # # Two things about kcov that cost an hour to find, both worth keeping: # # 1. It must be given the test script DIRECTLY, not `bash