chore: initial scaffolding of nag based on bash-boilerplate
This commit is contained in:
commit
d4319e1ef6
4 changed files with 507 additions and 0 deletions
19
test/test_helper.bash
Normal file
19
test/test_helper.bash
Normal 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 "$@"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue