X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2Ftest-lib.sh;h=06aaea270e946cb6811ed6e18258781b5d267b8d;hb=627f7b27f9756287795343cbb8a3137f74efccf9;hp=063a2b273049c18a9ba95cbede3348063a174d3b;hpb=e3fb62f59b7cf93c818f382a62c37eea2d1b4f74;p=notmuch diff --git a/test/test-lib.sh b/test/test-lib.sh index 063a2b27..06aaea27 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -318,7 +318,11 @@ generate_message () fi if [ -z "${template[subject]}" ]; then - template[subject]="Test message #${gen_msg_cnt}" + if [ -n "$test_subtest_name" ]; then + template[subject]="$test_subtest_name" + else + template[subject]="Test message #${gen_msg_cnt}" + fi fi if [ -z "${template[date]}" ]; then @@ -356,6 +360,11 @@ ${additional_headers}" ${additional_headers}" fi + if [ ! -z "${template[content-transfer-encoding]}" ]; then + additional_headers="Content-Transfer-Encoding: ${template[content-transfer-encoding]} +${additional_headers}" + fi + # Note that in the way we're setting it above and using it below, # `additional_headers' will also serve as the header / body separator # (empty line in between).