]> git.notmuchmail.org Git - notmuch/commitdiff
test suite: Generate message filenames from count, not Message-Id.
authorCarl Worth <cworth@cworth.org>
Fri, 4 Jun 2010 19:38:11 +0000 (12:38 -0700)
committerCarl Worth <cworth@cworth.org>
Fri, 4 Jun 2010 19:38:11 +0000 (12:38 -0700)
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).

test/notmuch-test

index cddaafb867792319ac6345f8c8e2a6eb9e7894ad..6f3fe0a929927810d5ac44aebbd8743c41224b36 100755 (executable)
@@ -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