send-email: do defaults -> config -> getopt in that order
[gitweb.git] / t / t9001-send-email.sh
index 1da282c415b81215ddb149f6230ff2a5a8eb4c95..c67be97e305a88656f1200e22b123d2836bde0ee 100755 (executable)
@@ -1433,7 +1433,18 @@ test_expect_success $PREREQ '--transfer-encoding overrides sendemail.transferEnc
        test -z "$(ls msgtxt*)"
 '
 
-test_expect_success $PREREQ 'sendemail.transferencoding=8bit' '
+test_expect_success $PREREQ 'sendemail.transferencoding=8bit via config' '
+       clean_fake_sendmail &&
+       git -c sendemail.transferencoding=8bit send-email \
+               --smtp-server="$(pwd)/fake.sendmail" \
+               email-using-8bit \
+               2>errors >out &&
+       sed '1,/^$/d' msgtxt1 >actual &&
+       sed '1,/^$/d' email-using-8bit >expected &&
+       test_cmp expected actual
+'
+
+test_expect_success $PREREQ 'sendemail.transferencoding=8bit via cli' '
        clean_fake_sendmail &&
        git send-email \
                --transfer-encoding=8bit \