test/corpora/default/01:2, |
[moved from test/corpus/01:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/02:2, |
[moved from test/corpus/02:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/bar/17:2, |
[moved from test/corpus/bar/17:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/bar/18:2, |
[moved from test/corpus/bar/18:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/bar/baz/05:2, |
[moved from test/corpus/bar/baz/05:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/bar/baz/23:2, |
[moved from test/corpus/bar/baz/23:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/bar/baz/24:2, |
[moved from test/corpus/bar/baz/24:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/bar/baz/cur/25:2, |
[moved from test/corpus/bar/baz/cur/25:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/bar/baz/cur/26:2, |
[moved from test/corpus/bar/baz/cur/26:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/bar/baz/new/27:2, |
[moved from test/corpus/bar/baz/new/27:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/bar/baz/new/28:2, |
[moved from test/corpus/bar/baz/new/28:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/bar/cur/19:2, |
[moved from test/corpus/bar/cur/19:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/bar/cur/20:2, |
[moved from test/corpus/bar/cur/20:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/bar/new/21:2, |
[moved from test/corpus/bar/new/21:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/bar/new/22:2, |
[moved from test/corpus/bar/new/22:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/29:2, |
[moved from test/corpus/cur/29:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/30:2, |
[moved from test/corpus/cur/30:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/31:2, |
[moved from test/corpus/cur/31:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/32:2, |
[moved from test/corpus/cur/32:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/33:2, |
[moved from test/corpus/cur/33:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/34:2, |
[moved from test/corpus/cur/34:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/35:2, |
[moved from test/corpus/cur/35:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/36:2, |
[moved from test/corpus/cur/36:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/37:2, |
[moved from test/corpus/cur/37:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/38:2, |
[moved from test/corpus/cur/38:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/39:2, |
[moved from test/corpus/cur/39:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/40:2, |
[moved from test/corpus/cur/40:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/41:2, |
[moved from test/corpus/cur/41:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/42:2, |
[moved from test/corpus/cur/42:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/43:2, |
[moved from test/corpus/cur/43:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/44:2, |
[moved from test/corpus/cur/44:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/45:2, |
[moved from test/corpus/cur/45:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/46:2, |
[moved from test/corpus/cur/46:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/47:2, |
[moved from test/corpus/cur/47:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/48:2, |
[moved from test/corpus/cur/48:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/49:2, |
[moved from test/corpus/cur/49:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/50:2, |
[moved from test/corpus/cur/50:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/51:2, |
[moved from test/corpus/cur/51:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/52:2, |
[moved from test/corpus/cur/52:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/cur/53:2, |
[moved from test/corpus/cur/53:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/foo/06:2, |
[moved from test/corpus/foo/06:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/foo/baz/11:2, |
[moved from test/corpus/foo/baz/11:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/foo/baz/12:2, |
[moved from test/corpus/foo/baz/12:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/foo/baz/cur/13:2, |
[moved from test/corpus/foo/baz/cur/13:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/foo/baz/cur/14:2, |
[moved from test/corpus/foo/baz/cur/14:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/foo/baz/new/15:2, |
[moved from test/corpus/foo/baz/new/15:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/foo/baz/new/16:2, |
[moved from test/corpus/foo/baz/new/16:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/foo/cur/07:2, |
[moved from test/corpus/foo/cur/07:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/foo/cur/08:2, |
[moved from test/corpus/foo/cur/08:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/foo/new/03:2, |
[moved from test/corpus/foo/new/03:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/foo/new/09:2, |
[moved from test/corpus/foo/new/09:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/foo/new/10:2, |
[moved from test/corpus/foo/new/10:2, with 100% similarity] |
patch | blob | history |
test/corpora/default/new/04:2, |
[moved from test/corpus/new/04:2, with 100% similarity] |
patch | blob | history |
test/test-lib.sh |
|
patch | blob | history |
notmuch new >/dev/null
}
-# Generate a corpus of email and add it to the database.
+# Add an existing, fixed corpus of email to the database.
#
-# This corpus is fixed, (it happens to be 50 messages from early in
-# the history of the notmuch mailing list), which allows for reliably
+# $1 is the corpus dir under corpora to add, using "default" if unset.
+#
+# The default corpus is based on about 50 messages from early in the
+# history of the notmuch mailing list, which allows for reliably
# testing commands that need to operate on a not-totally-trivial
# number of messages.
add_email_corpus ()
{
+ corpus=${1:-default}
+
rm -rf ${MAIL_DIR}
- if [ -d $TEST_DIRECTORY/corpus.mail ]; then
- cp -a $TEST_DIRECTORY/corpus.mail ${MAIL_DIR}
+ if [ -d $TEST_DIRECTORY/corpora.mail/$corpus ]; then
+ cp -a $TEST_DIRECTORY/corpora.mail/$corpus ${MAIL_DIR}
else
- cp -a $TEST_DIRECTORY/corpus ${MAIL_DIR}
+ cp -a $TEST_DIRECTORY/corpora/$corpus ${MAIL_DIR}
notmuch new >/dev/null || die "'notmuch new' failed while adding email corpus"
- cp -a ${MAIL_DIR} $TEST_DIRECTORY/corpus.mail
+ mkdir -p $TEST_DIRECTORY/corpora.mail
+ cp -a ${MAIL_DIR} $TEST_DIRECTORY/corpora.mail/$corpus
fi
}