Skip to content

Commit bf12181

Browse files
Denton-Lgitster
authored andcommitted
t9164: use test_must_fail only on git commands
The `test_must_fail` function should only be used for git commands; we are not in the business of catching segmentation fault by external commands. Shell helper functions test_cmp and svn_cmd used in this script are wrappers around external commands, so just use `! cmd` instead of `test_must_fail cmd` Signed-off-by: Denton Liu <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5c65897 commit bf12181

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t9164-git-svn-dcommit-concurrent.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ test_expect_success 'check if post-commit hook creates a concurrent commit' '
9292
echo 1 >> file &&
9393
svn_cmd commit -m "changing file" &&
9494
svn_cmd up &&
95-
test_must_fail test_cmp auto_updated_file au_file_saved
95+
! test_cmp auto_updated_file au_file_saved
9696
)
9797
'
9898

@@ -103,7 +103,7 @@ test_expect_success 'check if pre-commit hook fails' '
103103
echo 2 >> file &&
104104
svn_cmd commit -m "changing file once again" &&
105105
echo 3 >> file &&
106-
test_must_fail svn_cmd commit -m "this commit should fail" &&
106+
! svn_cmd commit -m "this commit should fail" &&
107107
svn_cmd revert file
108108
)
109109
'

0 commit comments

Comments
 (0)