t9001: fix broken "invoke hook" test
[gitweb.git] / t / t9001-send-email.sh
index e80eacbb1b81a319232c0b5f28aab3c82d795a93..776769fe0df6e9ba9ce7a67c92489f5f319f6455 100755 (executable)
@@ -1966,11 +1966,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
        )
 '