merge hook tests: use 'test_must_fail' instead of '!'

Signed-off-by: Benoit Pierre <benoit.pierre@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Benoit Pierre 2014-03-10 19:49:32 +01:00 committed by Junio C Hamano
parent 3219bad944
commit b7ae14148f

View File

@ -154,7 +154,7 @@ test_expect_success 'with failing hook' '
head=`git rev-parse HEAD` && head=`git rev-parse HEAD` &&
echo "more" >> file && echo "more" >> file &&
git add file && git add file &&
! GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit -c $head test_must_fail env GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit -c $head
' '
@ -163,7 +163,7 @@ test_expect_success 'with failing hook (--no-verify)' '
head=`git rev-parse HEAD` && head=`git rev-parse HEAD` &&
echo "more" >> file && echo "more" >> file &&
git add file && git add file &&
! GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit --no-verify -c $head test_must_fail env GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit --no-verify -c $head
' '