chore: initial scaffolding of nag based on bash-boilerplate

This commit is contained in:
Lewis Wynne 2026-04-01 19:45:20 +01:00
commit d4319e1ef6
4 changed files with 507 additions and 0 deletions

19
test/test_helper.bash Normal file
View file

@ -0,0 +1,19 @@
# test/test_helper.bash
# Shared setup/teardown for nag tests.
_NAG="$(cd "$(dirname "${BATS_TEST_FILENAME}")/.." && pwd)/nag"
setup() {
export NAG_PATH
NAG_PATH="$(mktemp)"
rm -f "${NAG_PATH}"
export NAG_CMD="true"
}
teardown() {
rm -f "${NAG_PATH}" "${NAG_PATH}.lock"
}
run_nag() {
run "${_NAG}" --yes "$@"
}