aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/notmuch-test
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-06-04 12:38:11 -0700
committerGravatar Carl Worth <cworth@cworth.org>2010-06-04 12:38:11 -0700
commit77ab73834325f2b2a8870204af60e116d4209f12 (patch)
tree6ac45ec941ac2aabf550a616b345c2cfcf37b518 /test/notmuch-test
parent552c61e2693a1be100d17a803b2e33209d09ae94 (diff)
test suite: Generate message filenames from count, not Message-Id.
We're about to add a test with an excessively long message-id, (512 characters or so). This exceeds filename length limits, so just always the simple counter to generate the filenames, (which we were doing for messages with non-custom IDs anyway).
Diffstat (limited to 'test/notmuch-test')
-rwxr-xr-xtest/notmuch-test6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/notmuch-test b/test/notmuch-test
index cddaafb8..6f3fe0a9 100755
--- a/test/notmuch-test
+++ b/test/notmuch-test
@@ -85,12 +85,12 @@ generate_message ()
local -A template="($@)"
local additional_headers
+ gen_msg_cnt=$((gen_msg_cnt + 1))
+ gen_msg_name=msg-$(printf "%03d" $gen_msg_cnt)
+
if [ -z "${template[id]}" ]; then
- gen_msg_cnt=$((gen_msg_cnt + 1))
- gen_msg_name=msg-$(printf "%03d" $gen_msg_cnt)
gen_msg_id="${gen_msg_name}@notmuch-test-suite"
else
- gen_msg_name="msg-${template[id]}"
gen_msg_id="${template[id]}"
fi