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).
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