summaryrefslogtreecommitdiff
path: root/mh/tests/comp.at
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-11-22 22:26:29 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2010-11-22 23:20:16 +0200
commit46b844cf0c0623dd370573ce6da21dd8aa6fd907 (patch)
tree7f23032ee01646f43723910e35bf6cecd38155f4 /mh/tests/comp.at
parente34d8c168f9031dbfc2441006e0eb24182ef4389 (diff)
downloadmailutils-46b844cf0c0623dd370573ce6da21dd8aa6fd907.tar.gz
mailutils-46b844cf0c0623dd370573ce6da21dd8aa6fd907.tar.bz2
Provide a library function for translating message UIDs to numbers and vice versa.
* include/mailutils/mailbox.h (MU_MAILBOX_UID_TO_MSGNO) (MU_MAILBOX_MSGNO_TO_UID): New defines. (mu_mailbox_translate): New proto. * include/mailutils/sys/mailbox.h (_mu_mailbox) <_translate>: New method. * libmailutils/mailbox/mailbox.c (mu_mailbox_translate): New function. * libproto/mh/mbox.c (mh_translate): New function. Implements the _translate method. * mh/mh_msgset.c (mh_uid_to_msgno, mh_msgno_to_uid): Remove. All callers updated to use mu_mailbox_translate instead. (mh_search_message): Remove. (mh_get_message): Rewrite using mu_mailbox_translate. * mh/comp.c (copy_message): Check return from mu_mailbox_get_message. * mh/mh_init.c (mh_draft_message): Rewrite using mu_url_sget_path. * mh/tests/comp.at: Test draftfolder functionality.
Diffstat (limited to 'mh/tests/comp.at')
-rw-r--r--mh/tests/comp.at55
1 files changed, 55 insertions, 0 deletions
diff --git a/mh/tests/comp.at b/mh/tests/comp.at
index 54a61b1c6..b1b53fffc 100644
--- a/mh/tests/comp.at
+++ b/mh/tests/comp.at
@@ -143,6 +143,61 @@ Subject: test input
message body
])
+MH_CHECK([comp -draftfolder],[comp05 comp-draftfolder],[
+mkdir Mail/drafts
+dir=`pwd`
+echo 'quit' | compcmd -draftfolder drafts | sed "s|$dir/*||;s| *$||"
+cat Mail/drafts/1
+],
+[0],
+[-- Editor invocation: Mail/drafts/1
+-- Input file:
+To:
+cc:
+Subject:
+--------
+-- Input file end
+What now? draft left on "Mail/drafts/1".
+To:
+cc:
+Subject:
+--------
+Seen by mhed
+])
+
+MH_CHECK([comp +draftfolder -use],[comp06 comp-draftfolder-use],[
+mkdir Mail/drafts
+AT_DATA([Mail/drafts/1],[From: gray
+To: root
+Subject: test input
+
+message body
+])
+echo "cur: 1" > Mail/drafts/.mh_sequences
+
+dir=`pwd`
+echo 'quit' | compcmd -draftfolder drafts -use| sed "s|$dir/*||;s| *$||"
+cat Mail/drafts/1
+],
+[0],
+[-- Editor invocation: Mail/drafts/1
+-- Input file:
+From: gray
+To: root
+Subject: test input
+
+message body
+-- Input file end
+What now? draft left on "Mail/drafts/1".
+From: gray
+To: root
+Subject: test input
+
+message body
+Seen by mhed
+])
+
+
m4_popdef([compcmd])
m4_popdef([MH_KEYWORDS])

Return to:

Send suggestions and report system problems to the System administrator.