aboutsummaryrefslogtreecommitdiffstats
path: root/mail-overview/test-mail-notify.sh
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-13 17:32:28 +0200
committerDanilo M. <danix@danix.xyz>2026-09-13 17:32:28 +0200
commitc4c4d9b0b05d4d327534487fc9cd412f8f34571f (patch)
treed26a70755e6b10560504fd3787cda19042b7ad57 /mail-overview/test-mail-notify.sh
parent3df934d85aee0d0db20c0fc522d60b0178f4018a (diff)
downloadquickshell-c4c4d9b0b05d4d327534487fc9cd412f8f34571f.tar.gz
quickshell-c4c4d9b0b05d4d327534487fc9cd412f8f34571f.zip
feat(mail-overview): title, icon and spaced bullet body
A live test showed the old title ("<label> · N new") read poorly and the body packed the rows into one block. Title is now "New Mail - <label> (N)" with the mail-unread icon, and each message is a bullet on its own line with a blank line between. +N more counts rows, not physical lines, so the blank lines do not skew it.
Diffstat (limited to 'mail-overview/test-mail-notify.sh')
-rwxr-xr-xmail-overview/test-mail-notify.sh20
1 files changed, 12 insertions, 8 deletions
diff --git a/mail-overview/test-mail-notify.sh b/mail-overview/test-mail-notify.sh
index d5db6c3..9fc21a9 100755
--- a/mail-overview/test-mail-notify.sh
+++ b/mail-overview/test-mail-notify.sh
@@ -87,24 +87,28 @@ rows_json='[
]'
check "a body lists author and subject per row" \
- "Alice Example — First subject
-Bob Example — Second subject
-Carol Example — Third subject" \
+ "• Alice Example — First subject
+
+• Bob Example — Second subject
+
+• Carol Example — Third subject" \
"$(build_body "$rows_json" 3)"
check "a batch bigger than the rows shown is elided" \
- "Alice Example — First subject
-Bob Example — Second subject
-Carol Example — Third subject
+ "• Alice Example — First subject
+
+• Bob Example — Second subject
+
+• Carol Example — Third subject
+7 more" \
"$(build_body "$rows_json" 10)"
check "markup characters are escaped, not rendered" \
- "A &amp; B — &lt;script&gt;" \
+ "• A &amp; B — &lt;script&gt;" \
"$(build_body '[{"authors":"A & B","subject":"<script>"}]' 1)"
check "a missing subject says so rather than printing nothing" \
- "Alice Example — (no subject)" \
+ "• Alice Example — (no subject)" \
"$(build_body '[{"authors":"Alice Example","subject":null}]' 1)"
check "malformed json yields an empty body rather than an error" \