Bugfix: Order of arguments passed unit tests but caused invalid parsing
of expire time argument Modified: How icon argument is called
This commit is contained in:
parent
f405233080
commit
a663a08bca
2 changed files with 3 additions and 3 deletions
|
@ -61,10 +61,10 @@ function _auto_notify_message() {
|
|||
fi
|
||||
local icon_arg=""
|
||||
if [[ -n "$icon" ]]; then
|
||||
icon_arg=" --icon=$icon"
|
||||
icon_arg="--icon=$icon"
|
||||
fi
|
||||
|
||||
notify-send "$title" "$body" --app-name=zsh $transient "--urgency=$urgency" "--expire-time=$AUTO_NOTIFY_EXPIRE_TIME$icon_arg"
|
||||
notify-send "$title" "$body" --app-name=zsh $transient "--urgency=$urgency" "--expire-time=$AUTO_NOTIFY_EXPIRE_TIME" "$icon_arg"
|
||||
elif [[ "$platform" == "Darwin" ]]; then
|
||||
osascript \
|
||||
-e 'on run argv' \
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
assert "$lines[1]" same_as 'Notification Title: "f bar -r" Completed'
|
||||
assert "$lines[2]" same_as "Notification Body: Total time: 20 seconds"
|
||||
assert "$lines[3]" same_as "Exit code: 0"
|
||||
assert "$lines[4]" same_as "--app-name=zsh --hint=int:transient:1 --urgency=normal --expire-time=15000"
|
||||
assert "$lines[4]" same_as "--app-name=zsh --hint=int:transient:1 --urgency=normal --expire-time=15000 "
|
||||
}
|
||||
|
||||
@test 'auto-notify-send sends notification and icon on Linux on success' {
|
||||
|
|
Loading…
Add table
Reference in a new issue