scm: add support for labels + tests

Add procedures 'label' (for a message) and all-labels (for a store).
This commit is contained in:
Dirk-Jan C. Binnema
2025-08-10 14:59:43 +03:00
parent 46fa4f2aa2
commit 910cec591f
5 changed files with 76 additions and 2 deletions

View File

@ -120,6 +120,16 @@
(test-end "test-message-parts")))
(define (test-message-labels)
(test-begin "test-message-labels")
(let* ((perfmsgs (mfind "label:performance")))
(test-equal 4 (length perfmsgs))
(for-each (lambda (msg)
(test-equal 1 (length (labels msg)))
(test-equal "performance" (car (labels msg))))
perfmsgs))
(test-end "test-message-labels"))
(define (test-message-new)
(test-begin "test-message-new")
(let ((msg (make-message (format #f "~a/testdir2/Foo/cur/mail5" (getenv "MU_TESTDATADIR"))))
@ -187,6 +197,7 @@
(test-message-full)
(test-message-more)
(test-message-parts)
(test-message-labels)
(test-message-new)
(test-options)
(test-helpers)