Skip to content

Commit

Permalink
merge hook tests: use 'test_must_fail' instead of '!'
Browse files Browse the repository at this point in the history
Signed-off-by: Benoit Pierre <benoit.pierre@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Benoit Pierre authored and Junio C Hamano committed Mar 11, 2014
1 parent 3219bad commit b7ae141
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t/t7505-prepare-commit-msg-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ test_expect_success 'with failing hook' '
head=`git rev-parse HEAD` &&
echo "more" >> file &&
git add file &&
! GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit -c $head
test_must_fail env GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit -c $head
'

Expand All @@ -163,7 +163,7 @@ test_expect_success 'with failing hook (--no-verify)' '
head=`git rev-parse HEAD` &&
echo "more" >> 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
'

Expand Down

0 comments on commit b7ae141

Please sign in to comment.