summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/test-corpus.scm.in9
1 files changed, 7 insertions, 2 deletions
diff --git a/build-aux/test-corpus.scm.in b/build-aux/test-corpus.scm.in
index 9e66132..2bf7a0a 100644
--- a/build-aux/test-corpus.scm.in
+++ b/build-aux/test-corpus.scm.in
@@ -62,6 +62,10 @@ parse-email fails to fail directory."
index)
(cut put-bytevector <> email)))
+(define read-next-email-in-mbox
+ (@@ (email email)
+ read-next-email-in-mbox))
+
(define (test-corpus corpus)
"Test CORPUS, a directory containing mbox files."
(for-each (lambda (mbox)
@@ -69,7 +73,7 @@ parse-email fails to fail directory."
(display (format "~a~%" mbox-path))
(call-with-input-file mbox-path
(lambda (port)
- (list-transduce (compose (tenumerate)
+ (port-transduce (compose (tenumerate)
(tmap (match-lambda
((index . bv)
(catch #t
@@ -78,7 +82,8 @@ parse-email fails to fail directory."
(lambda _
(write-failed-email corpus mbox index bv)))))))
(const #t)
- (mbox->emails port))))))
+ read-next-email-in-mbox
+ port)))))
(directory-files corpus)))
;; If fail directory exists, delete its contents. Else, create it.