diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-13 18:26:47 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-13 18:26:47 +0200 |
| commit | 1a01efb088df07cae3f517e69940392606d00d94 (patch) | |
| tree | eff67bf588b6bd479cf10127bde760fadd551a7b /mail-overview/test-mail-notify.sh | |
| parent | 2eb373726a0abe07741138616a9e2bc70a2f753b (diff) | |
| download | quickshell-1a01efb088df07cae3f517e69940392606d00d94.tar.gz quickshell-1a01efb088df07cae3f517e69940392606d00d94.zip | |
fix(mail-overview): don't re-notify the prior batch, flatten newlines
The lastmod range is inclusive at both ends and the stored revision
was reused as the next start, so the batch just notified matched
again. Start one revision later.
A subject can contain a newline, which broke the bullet rows and the
+N more count; flatten CR/LF to a space before escaping.
Also reconciles the state-write comment and spec with the actual
skip-and-advance failure behavior, and corrects two doc wordings.
Diffstat (limited to 'mail-overview/test-mail-notify.sh')
| -rwxr-xr-x | mail-overview/test-mail-notify.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mail-overview/test-mail-notify.sh b/mail-overview/test-mail-notify.sh index 9fc21a9..1c3e01a 100755 --- a/mail-overview/test-mail-notify.sh +++ b/mail-overview/test-mail-notify.sh @@ -115,6 +115,10 @@ check "malformed json yields an empty body rather than an error" \ "" \ "$(build_body 'not json at all' 1 2>/dev/null)" +check "a newline in a subject stays on one row" \ + "• Alice Example — line one line two" \ + "$(build_body '[{"authors":"Alice Example","subject":"line one\nline two"}]' 1)" + # A scratch state file, removed at exit. Never the real one: that is the # user's live notification position, and a test must not move it. tmpstate="$(mktemp)" |
