feat: -f/-v/-e flags, 5-field TSV with tags in field 2

This commit is contained in:
Lewis Wynne 2026-04-02 15:46:16 +01:00
parent 6b7fef5d2c
commit 2b36640567
9 changed files with 76 additions and 58 deletions

View file

@ -10,22 +10,16 @@ load test_helper
}
@test "edit opens the alarms file in EDITOR" {
write_alarm "1 9999999999 test alarm"
write_alarm "1 9999999999 test alarm"
EDITOR="cat" run_nag edit
[[ "$status" -eq 0 ]]
[[ "$output" == *"test alarm"* ]]
}
@test "-e flag invokes edit" {
write_alarm "1 9999999999 test alarm"
write_alarm "1 9999999999 test alarm"
EDITOR="cat" run_nag -e
[[ "$status" -eq 0 ]]
[[ "$output" == *"test alarm"* ]]
}
@test "--edit flag invokes edit" {
write_alarm "1 9999999999 test alarm"
EDITOR="cat" run_nag --edit
[[ "$status" -eq 0 ]]
[[ "$output" == *"test alarm"* ]]
}