Improve tracking code and add more tests

This commit is contained in:
Michael Aquilina 2019-07-17 21:36:30 +01:00
parent f480c50990
commit bf73292fd0
No known key found for this signature in database
GPG key ID: 636066730B056BD1
2 changed files with 31 additions and 13 deletions

View file

@ -44,6 +44,17 @@
assert '_auto_notify_send' in $precmd_functions
}
@test 'auto-notify-send does not send notification if tracking not set' {
unset AUTO_COMMAND
unset AUTO_COMMAND_FULL
unset AUTO_COMMAND_START
run _auto_notify_send
assert $state equals 0
assert "$output" is_empty
}
@test 'auto-notify-send does not send notification for short task' {
AUTO_COMMAND="foo bar -r"
AUTO_COMMAND_FULL="foo bar -r"