path: root/t/
diff options
authorEric Sunshine <>2018-07-02 00:23:53 (GMT)
committerJunio C Hamano <>2018-07-16 21:38:47 (GMT)
commitbe8c48d4c4e42a7fe879241ca4e52325dd4f96f0 (patch)
tree8fcbca94da77fdb868e52b5708519bad6a6d787b /t/
parentd964def526b2256a1d573597e978774f1e584770 (diff)
t9001: fix broken "invoke hook" test
This test has been dysfunctional since it was added by 6489660b4b (send-email: support validate hook, 2017-05-12), however, the problem went unnoticed due to a broken &&-chain late in the test. The test wants to verify that a non-zero exit code from the 'sendemail-validate' hook causes git-send-email to abort with a particular error message. A command which is expected to fail should be run with 'test_must_fail', however, the test neglects to do so. Fix this problem, as well as the broken &&-chain behind which the problem hid. Signed-off-by: Eric Sunshine <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't/')
1 files changed, 2 insertions, 2 deletions
diff --git a/t/ b/t/
index e80eacb..776769f 100755
--- a/t/
+++ b/t/
@@ -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 <>" \ \
--smtp-server="$(pwd)/../fake.sendmail" \
- ../another.patch 2>err
+ ../another.patch 2>err &&
test_i18ngrep "rejected by sendemail-validate hook" err