diff options
author | Michal Sojka <sojkam1@fel.cvut.cz> | 2010-10-31 22:29:18 +0100 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-11-10 13:09:32 -0800 |
commit | 736ac42c45f62103e99ef18ef06b201d0bcd546f (patch) | |
tree | 326d9d637298db196b1859d56ae3f38bdde81262 /test/test-lib.sh | |
parent | d9d3d3e6f06a76dc0fbe24c9655b64acfcd4b9e4 (diff) |
Tests for maildir synchronization
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Diffstat (limited to 'test/test-lib.sh')
-rw-r--r-- | test/test-lib.sh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/test/test-lib.sh b/test/test-lib.sh index feb24f8..418eaa7 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -245,6 +245,12 @@ increment_mtime () # Generate the message in directory 'directory/of/choice' within # the mail store. The directory will be created if necessary. # +# [filename]=name +# +# Store the message in file 'name'. The default is to store it +# in 'msg-<count>', where <count> is three-digit number of the +# message. +# # [body]=text # # Text to use as the body of the email message @@ -281,10 +287,14 @@ generate_message () local additional_headers gen_msg_cnt=$((gen_msg_cnt + 1)) - gen_msg_name=msg-$(printf "%03d" $gen_msg_cnt) + if [ -z "${template[filename]}" ]; then + gen_msg_name="msg-$(printf "%03d" $gen_msg_cnt)" + else + gen_msg_name=${template[filename]} + fi if [ -z "${template[id]}" ]; then - gen_msg_id="${gen_msg_name}@notmuch-test-suite" + gen_msg_id="${gen_msg_name%:2,*}@notmuch-test-suite" else gen_msg_id="${template[id]}" fi |