diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-15 18:03:29 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-15 18:03:29 +0200 |
| commit | 03784b2024436827de25515b1d85d9ffdde40745 (patch) | |
| tree | bbd1d9264a83a5ea6ad359fe699b622ec15386bb /test-notifyctl.sh | |
| parent | 7a6b1c1ada3ba6ca2ca4ed70cf51f2f5f30d7b1e (diff) | |
| download | notifyd-03784b2024436827de25515b1d85d9ffdde40745.tar.gz notifyd-03784b2024436827de25515b1d85d9ffdde40745.zip | |
feat(notify): materialise notification images
Notify resolves app_icon and image-path theme names, decodes image-data to
a PNG under the image directory, and re-publishes the entry with its
image path. The daemon advertises body-images, and removeImage refuses to
touch a path outside its own directory so a client's screenshot file is
never deleted.
Diffstat (limited to 'test-notifyctl.sh')
| -rwxr-xr-x | test-notifyctl.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test-notifyctl.sh b/test-notifyctl.sh index 7018e2a..e91307a 100755 --- a/test-notifyctl.sh +++ b/test-notifyctl.sh @@ -51,6 +51,9 @@ dbus-run-session -- bash -c ' notify-send -a test -u normal "t1" "b1" || exit 3 sleep 0.3 echo "$(notifyctl list | grep -c "\"summary\": \"t1\"")" + notify-send -a test -u normal --hint=string:image-path:/tmp/x.png "t2" "b2" || exit 3 + sleep 0.3 + echo "$(notifyctl list | grep -c "\"image\": \"/tmp/x.png\"")" notifyctl close-all sleep 0.3 echo "$(notifyctl list | grep -c "\"summary\": \"t1\"")" @@ -58,7 +61,8 @@ dbus-run-session -- bash -c ' ' _ "$tmp" > "$tmp/out" 2>"$tmp/err" check "list shows the notification" "1" "$(sed -n 1p "$tmp/out")" -check "close-all empties the live queue" "0" "$(sed -n 2p "$tmp/out")" +check "image-path is published" "1" "$(sed -n 2p "$tmp/out")" +check "list clears" "0" "$(sed -n 3p "$tmp/out")" check "no errors on stderr" "" "$(cat "$tmp/err")" printf '\n%d passed, %d failed\n' "$pass" "$fail" |
