1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
# This file is part of GNU Mailutils -*- Autotest -*-
# Copyright (C) 2018-2025 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([mailbox print])
AT_KEYWORDS([mailbox])
WITH_MAILBOX([spool/mbox1],
[MU_GUILE_CHECK([
(use-modules ((ice-9 regex)))
(let ((s (with-output-to-string
(lambda ()
(display (mu-mailbox-open "mbox" "r"))))))
(cond
((string-match
"^(#<mailbox[[:space:]]+).*/(mbox[[:space:]]+\\(5\\)>)$" s)
(exit 0))
(else
(display s)(newline)
(exit 1))))
(newline)])])
AT_CLEANUP
|