Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-03-07 15:48:58 +0300
committerJunio C Hamano <gitster@pobox.com>2022-03-08 00:27:40 +0300
commit8127a2b1f51658f4e3fad1d70bef9ce7a0d030ed (patch)
tree27700372a45fc80d02ee1035e103310c0d746fb5 /t/t6407-merge-binary.sh
parent1ff543acd01b9e8cfe9af7c262d118ab0bf4d5e7 (diff)
merge tests: use "test_must_fail" instead of ad-hoc pattern
As in the preceding commit change a similar fragile test pattern introduced in b798671fa93 (merge-recursive: do not rudely die on binary merge, 2007-08-14) to use a "test_must_fail" instead. Before this we wouldn't distinguish normal "git merge" failures from segfaults or abort(). Unlike the preceding commit we didn't end up hiding any SANITIZE=leak failures in this case, but let's correspondingly change these anyway. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6407-merge-binary.sh')
-rwxr-xr-xt/t6407-merge-binary.sh22
1 files changed, 6 insertions, 16 deletions
diff --git a/t/t6407-merge-binary.sh b/t/t6407-merge-binary.sh
index 8e6241f92e..0753fc95f4 100755
--- a/t/t6407-merge-binary.sh
+++ b/t/t6407-merge-binary.sh
@@ -43,14 +43,9 @@ test_expect_success resolve '
rm -f a* m* &&
git reset --hard anchor &&
- if git merge -s resolve main
- then
- echo Oops, should not have succeeded
- false
- else
- git ls-files -s >current &&
- test_cmp expect current
- fi
+ test_must_fail git merge -s resolve main &&
+ git ls-files -s >current &&
+ test_cmp expect current
'
test_expect_success recursive '
@@ -58,14 +53,9 @@ test_expect_success recursive '
rm -f a* m* &&
git reset --hard anchor &&
- if git merge -s recursive main
- then
- echo Oops, should not have succeeded
- false
- else
- git ls-files -s >current &&
- test_cmp expect current
- fi
+ test_must_fail git merge -s recursive main &&
+ git ls-files -s >current &&
+ test_cmp expect current
'
test_done