@matheusbsbs / matheus-bagliano / commits / bf12181068
Fork 0

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 <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Denton Liu committed Apr 20, 2020 at 04:54 UTC bf1218106835fb06f8862c6727dd4453e9ea5fd9
1 file changed +2 -2
t/t9164-git-svn-dcommit-concurrent.sh
+2 -2
@@ -92,7 +92,7 @@ test_expect_success 'check if post-commit hook creates a concurrent commit' '
92 echo 1 >> file &&
93 svn_cmd commit -m "changing file" &&
94 svn_cmd up &&
95 - test_must_fail test_cmp auto_updated_file au_file_saved
95 + ! test_cmp auto_updated_file au_file_saved
96 )
97 '
98
@@ -103,7 +103,7 @@ test_expect_success 'check if pre-commit hook fails' '
103 echo 2 >> file &&
104 svn_cmd commit -m "changing file once again" &&
105 echo 3 >> file &&
106 - test_must_fail svn_cmd commit -m "this commit should fail" &&
106 + ! svn_cmd commit -m "this commit should fail" &&
107 svn_cmd revert file
108 )
109 '