diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2020-11-16 09:44:44 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2020-11-16 09:48:03 +0200 |
commit | 500bab2e34400206f0e8982b11d6cc07fac52ffa (patch) | |
tree | d0cc7f0918a7c2de31b1df77052f46130a20e308 /libmailutils | |
parent | d7110faad78c2095ca39e380a7a3a6cdff413b2e (diff) | |
download | mailutils-500bab2e34400206f0e8982b11d6cc07fac52ffa.tar.gz mailutils-500bab2e34400206f0e8982b11d6cc07fac52ffa.tar.bz2 |
Write testsuite for mh mailbox library
* libmailutils/base/amd.c (amd_get_attr_flags): Scan the message
if AMD does not report MU_AMD_STATUS capability.
* libproto/mh/mbox.c (mh_qfetch): Fix,
* libproto/mh/Makefile.am (SUBDIRS): Add tests.
* libproto/mh/tests/.gitignore: New file.
* libproto/mh/tests/Makefile.am: New file.
* libproto/mh/tests/append.at: New file.
* libproto/mh/tests/atlocal.in: New file.
* libproto/mh/tests/attr.at: New file.
* libproto/mh/tests/autodetect.at: New file.
* libproto/mh/tests/body.at: New file.
* libproto/mh/tests/count.at: New file.
* libproto/mh/tests/delete.at: New file.
* libproto/mh/tests/envelope.at: New file.
* libproto/mh/tests/header.at: New file.
* libproto/mh/tests/qget.at: New file.
* libproto/mh/tests/testsuite.at: New file.
* libproto/mh/tests/uid.at: New file.
* libproto/mh/tests/uidvalidity.at: New file.
Diffstat (limited to 'libmailutils')
-rw-r--r-- | libmailutils/base/amd.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libmailutils/base/amd.c b/libmailutils/base/amd.c index aca704dbd..9b8728d15 100644 --- a/libmailutils/base/amd.c +++ b/libmailutils/base/amd.c @@ -2037,6 +2037,15 @@ amd_get_attr_flags (mu_attribute_t attr, int *pflags) if (mhm == NULL) return EINVAL; + if (!(mhm->amd->capabilities & MU_AMD_STATUS)) + { + /* If AMD implementation doesn't handle status (attribute) bits, they + must be retrieved from the Status: header. To ensure that, the + message must be scanned: */ + int rc = amd_check_message (mhm); + if (rc) + return rc; + } if (pflags) *pflags = mhm->attr_flags; return 0; |