summaryrefslogtreecommitdiff
path: root/libmu_scm/tests/mailbox-iterate.at
blob: 15a9fe45e8c85cb897c940b47c44ac525581974c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# This file is part of GNU Mailutils                    -*- Autotest -*-
# Copyright (C) 2018-2021 Free Software Foundation, Inc.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
# This is free software: you are free to change and redistribute it.
# There is NO WARRANTY, to the extent permitted by law.

AT_SETUP([mu-mailbox-first/next-message])
AT_KEYWORDS([mailbox])
WITH_MAILBOX([spool/mbox1],
 [MU_GUILE_CHECK([
(let ((mbox (mu-mailbox-open "mbox" "r")))
  (do ((msg (mu-mailbox-first-message mbox) (mu-mailbox-next-message mbox)))
      ((not (mu-mailbox-more-messages? mbox)))
    (display msg)(newline)))], 
 0,
[#<message "foobar@nonexistent.net" "Fri Dec 28 22:18" 44 1254>
#<message "bar@dontmailme.org" "Fri Dec 28 23:28" 13 534>
#<message "gray@example.net" "Sat Jul 13 00:43" 42 1569>
#<message "gray@example.net" "Sat Jul 13 00:50" 84 3399>
#<message "gray@example.net" "Sat Jul 13 00:43" 27 857>
])])
AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.