mu-scm: add full-message support (body/header)
Implement support for "header" and "body" procedures, with require loading the message file from disk, and create a foreign object for the message. We keep those alive in a vector, and hook up a finalizer. Update docs & tests as well.
This commit is contained in:
@ -54,6 +54,22 @@
|
||||
(test-end "test-mfind"))
|
||||
|
||||
|
||||
(define (test-message-full)
|
||||
(test-begin "test-message-full")
|
||||
|
||||
(let ((msg (cadr (mfind ""))))
|
||||
(test-equal "Motörhead" (header msg "Subject"))
|
||||
(test-equal "Mü <testmu@testmu.xx>" (header msg "From"))
|
||||
(test-equal #f (header msg "Bla"))
|
||||
|
||||
(test-equal (string-append "\nTest for issue #38, where apparently searching for "
|
||||
"accented words in subject,\nto etc. fails.\n\n"
|
||||
"What about here? Queensrÿche. Mötley Crüe.\n\n\n")
|
||||
(body msg))
|
||||
(test-equal #f (body msg #:html? #t))
|
||||
|
||||
(test-end "test-message-full")))
|
||||
|
||||
(define (test-misc)
|
||||
(let ((opts (options)))
|
||||
(test-assert (>= (length opts) 4))
|
||||
@ -79,6 +95,7 @@
|
||||
(test-basic)
|
||||
(test-basic-mfind)
|
||||
(test-mfind)
|
||||
(test-message-full)
|
||||
(test-misc)
|
||||
(test-helpers)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user