send-email: avoid empty transfer encoding header
[gitweb.git] / t / t9001-send-email.sh
index 1da282c415b81215ddb149f6230ff2a5a8eb4c95..8e36a67b3ac5329426da3c093fbf4655b3978bd9 100755 (executable)
@@ -493,6 +493,21 @@ do
                        --validate \
                        $patches longline.patch
        '
+
+done
+
+for enc in 7bit 8bit quoted-printable base64
+do
+       test_expect_success $PREREQ "--transfer-encoding=$enc produces correct header" '
+               clean_fake_sendmail &&
+               git send-email \
+                       --from="Example <nobody@example.com>" \
+                       --to=nobody@example.com \
+                       --smtp-server="$(pwd)/fake.sendmail" \
+                       --transfer-encoding=$enc \
+                       $patches &&
+               grep "Content-Transfer-Encoding: $enc" msgtxt1
+       '
 done
 
 test_expect_success $PREREQ 'Invalid In-Reply-To' '