summaryrefslogtreecommitdiff
path: root/mh/tests
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-12-30 19:52:49 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2011-12-30 20:17:31 +0200
commita01bb419262e90164a558075e3607fb3b0514443 (patch)
tree6b034965e51fba477b15d5098a598ee7cfc5e9be /mh/tests
parent26cfa2197d5a2866f1a08c48f94d65504fdef7b1 (diff)
downloadmailutils-a01bb419262e90164a558075e3607fb3b0514443.tar.gz
mailutils-a01bb419262e90164a558075e3607fb3b0514443.tar.bz2
Improve msgset interface. Use it in MH.
* libmailutils/msgset/Makefile.am (libmsgset_la_SOURCES): Add new files. * libmailutils/msgset/addset.c: New file. * libmailutils/msgset/count.c: New file. * libmailutils/msgset/foreachmsgno.c: New file. * libmailutils/msgset/foreachuid.c: New file. * libmailutils/msgset/isempty.c: New file. * libmailutils/msgset/subset.c: New file. * libmailutils/msgset/trans.c: New file. * libmailutils/msgset/add.c (mu_msgset_add_range): Take fourth argument specifying the conversion mode. Translate numbers as necessary. * libmailutils/msgset/foreachmsg.c: Translate numbers as necessary. * libmailutils/msgset/foreachnum.c: Rewrite. * libmailutils/msgset/negate.c (_invert_range) (mu_msgset_add_range): Update calls to mu_msgset_add_range. * libmailutils/msgset/parse.c (parse_msgnum_env)<mode>: New member. (parse_msgrange): Update calls to mu_msgset_add_range. (mu_msgset_parse_imap): Change signature. All callers updated. * libmailutils/msgset/sub.c (mu_msgset_sub_range): Take fourth argument specifying the conversion mode. Translate numbers as necessary. * imap4d/copy.c (imap4d_copy0): Update calls to mu_msgset_create and mu_msgset_parse_imap. * imap4d/fetch.c (fetch_thunk): Likewise. * imap4d/search.c (parse_simple_key): Likewise. * imap4d/store.c (store_thunk): Likewise. * include/mailutils/msgset.h (MU_MSGSET_NUM,MU_MSGSET_UID): New defines. (mu_msgset_add,mu_msgset_sub): New protos. (mu_msgset_add_range,mu_msgset_sub_range): Take 4 arguments. All callers changed. * include/mailutils/sys/msgset.h (_mu_msgset_translate_pair) (_mu_msgset_translate_range): New protos. * libmailutils/tests/msgset.c: Reflect the above changes. * testsuite/msgset.c: Likewise. * libproto/imap/mbox.c: Update calls to mu_msgset functions. * mh/mh.h (mh_msgset_t): Remove. (mh_iterator_fp): Remove typedef. (mh_msgset_parse): Change signature. (mh_msgset_member,mh_msgset_reverse,mh_msgset_negate) (mh_msgset_current,mh_msgset_free,mh_msgset_uids): Remove protos. (mh_msgset_parse_string): New proto. (mh_msgset_first_current,mh_msgset_first): New proto. (mh_iterate: Remove proto. Use mu_msgset_foreach* functions instead. (mh_seq_add,mh_seq_delete): Change signatures. * mh/mh_init.c (mh_iterate): Remove. * mh/mh_msgset.c: Rewrite using mu_msgset_t. * mh/mh_sequence.c: Likewise. * mh/anno.c: Use new msgset functions. * mh/burst.c: Likewise. * mh/comp.c: Likewise. * mh/folder.c: Likewise. * mh/forw.c: Likewise. * mh/mark.c: Likewise. * mh/mhn.c: Likewise. * mh/mhpath.c: Likewise. * mh/mhseq.c: Likewise. * mh/pick.c: Likewise. * mh/refile.c: Likewise. * mh/repl.c: Likewise. * mh/rmm.c: Likewise. * mh/scan.c: Likewise. * mh/send.c: Likewise. * mh/sortm.c: Likewise. * mh/whatnowenv.c: Likewise. * mh/tests/mark.at: Reflect changes in the format of the saved sequences, which may contain ranges now. * mu/imap.c: Update calls to mu_msgset functions.
Diffstat (limited to 'mh/tests')
-rw-r--r--mh/tests/mark.at6
1 files changed, 3 insertions, 3 deletions
diff --git a/mh/tests/mark.at b/mh/tests/mark.at
index 8072dc72b..363fafc6a 100644
--- a/mh/tests/mark.at
+++ b/mh/tests/mark.at
@@ -25,7 +25,7 @@ mark -sequence andro -add 3-5
sed -n '/^andro:/{s/ */ /g;s/ $//;p;}' Mail/inbox/.mh_sequences
],
[0],
-[andro: 2 3 4 5
+[andro: 2-5
])
MH_CHECK([mark -add -zero],[mark01 mark-add-zero],[
@@ -48,7 +48,7 @@ mark -nopublic -sequence andro -add 1 2 3
sed -n '/^atr-andro/{s/ */ /g;s/ $//;s/^[[^:]]*:/atr-andro:/;p;}' Mail/context
],
[0],
-[atr-andro: 1 2 3
+[atr-andro: 1-3
])
MH_CHECK([mark -del],[mark03 mark-del],[
@@ -67,7 +67,7 @@ MUT_MBCOPY($abs_top_srcdir/testsuite/mh/mbox1,[Mail/inbox])
echo 'Current-Folder: inbox' > Mail/context
inbox=`pwd`/Mail/inbox
cat > Mail/context <<EOT
-atr-andro-$inbox: 2 3 4 5
+atr-andro-$inbox: 2-5
EOT
mark -nopublic -sequence andro -del 3
sed -n '/^atr-andro/{s/ */ /g;s/ $//;s/^[[^:]]*:/atr-andro:/;p;}' Mail/context

Return to:

Send suggestions and report system problems to the System administrator.