Merge branch 'jt/commit-graph-per-object-store'
[gitweb.git] / t / t9001-send-email.sh
index 1da282c415b81215ddb149f6230ff2a5a8eb4c95..1ef1a19003db5c9be94197e9d6cb25110591705b 100755 (executable)
@@ -253,10 +253,9 @@ test_suppress_self () {
 
        mv msgtxt1 msgtxt1-$3 &&
        sed -e '/^$/q' msgtxt1-$3 >"msghdr1-$3" &&
-       >"expected-no-cc-$3" &&
 
        (grep '^Cc:' msghdr1-$3 >"actual-no-cc-$3";
-        test_cmp expected-no-cc-$3 actual-no-cc-$3)
+        test_must_be_empty actual-no-cc-$3)
 }
 
 test_suppress_self_unquoted () {
@@ -332,7 +331,7 @@ test_expect_success $PREREQ 'Show all headers' '
 
 test_expect_success $PREREQ 'Prompting works' '
        clean_fake_sendmail &&
-       (echo "to@example.com"
+       (echo "to@example.com" &&
         echo ""
        ) | GIT_SEND_EMAIL_NOTTY=1 git send-email \
                --smtp-server="$(pwd)/fake.sendmail" \
@@ -509,8 +508,8 @@ test_expect_success $PREREQ 'Invalid In-Reply-To' '
 
 test_expect_success $PREREQ 'Valid In-Reply-To when prompting' '
        clean_fake_sendmail &&
-       (echo "From Example <from@example.com>"
-        echo "To Example <to@example.com>"
+       (echo "From Example <from@example.com>" &&
+        echo "To Example <to@example.com>" &&
         echo ""
        ) | GIT_SEND_EMAIL_NOTTY=1 git send-email \
                --smtp-server="$(pwd)/fake.sendmail" \
@@ -2023,11 +2022,11 @@ test_expect_success $PREREQ 'invoke hook' '
 
                # Verify error message when a patch is rejected by the hook
                sed -e "s/add master/x/" ../0001-add-master.patch >../another.patch &&
-               git send-email \
+               test_must_fail git send-email \
                        --from="Example <nobody@example.com>" \
                        --to=nobody@example.com \
                        --smtp-server="$(pwd)/../fake.sendmail" \
-                       ../another.patch 2>err
+                       ../another.patch 2>err &&
                test_i18ngrep "rejected by sendemail-validate hook" err
        )
 '