Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit b7ae141

Browse files
benoit-pierregitster
authored andcommitted
merge hook tests: use 'test_must_fail' instead of '!'
Signed-off-by: Benoit Pierre <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3219bad commit b7ae141

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t7505-prepare-commit-msg-hook.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ test_expect_success 'with failing hook' '
154154
head=`git rev-parse HEAD` &&
155155
echo "more" >> file &&
156156
git add file &&
157-
! GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit -c $head
157+
test_must_fail env GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit -c $head
158158
159159
'
160160

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

0 commit comments

Comments
 (0)