feat: interactive confirmation for tagged stop and skip

This commit is contained in:
Lewis Wynne 2026-04-02 16:57:05 +01:00
parent 8cf79c854b
commit d73ebdbddd
4 changed files with 42 additions and 14 deletions

View file

@ -36,9 +36,9 @@ load test_helper
@test "skip by tag requires -f" {
run_nag every day "tomorrow 3pm" "daily work"
run_nag tag 1 work
run "${_NAG}" skip work
run "${_NAG}" skip work < /dev/null
[ "${status}" -eq 0 ]
[[ "${output}" =~ "Would skip" ]]
[[ "${output}" =~ "Skip" ]]
[[ "${output}" =~ "-f" ]]
}

View file

@ -36,9 +36,9 @@ load test_helper
@test "stop by tag requires -f" {
run_nag at "tomorrow 3pm" "tagged alarm"
run_nag tag 1 work
run "${_NAG}" stop work
run "${_NAG}" stop work < /dev/null
[ "${status}" -eq 0 ]
[[ "${output}" =~ "Would stop" ]]
[[ "${output}" =~ "Stop" ]]
[[ "${output}" =~ "-f" ]]
[ -s "${NAG_DIR}/alarms" ]
}