mirror of
https://github.com/git/git
synced 2024-08-24 10:15:51 +00:00
merge tests: use "test_must_fail" instead of ad-hoc pattern
As in the preceding commit change a similar fragile test pattern
introduced in b798671fa9
(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>
This commit is contained in:
parent
1ff543acd0
commit
8127a2b1f5
|
@ -43,14 +43,9 @@ test_expect_success resolve '
|
||||||
rm -f a* m* &&
|
rm -f a* m* &&
|
||||||
git reset --hard anchor &&
|
git reset --hard anchor &&
|
||||||
|
|
||||||
if git merge -s resolve main
|
test_must_fail git merge -s resolve main &&
|
||||||
then
|
git ls-files -s >current &&
|
||||||
echo Oops, should not have succeeded
|
test_cmp expect current
|
||||||
false
|
|
||||||
else
|
|
||||||
git ls-files -s >current &&
|
|
||||||
test_cmp expect current
|
|
||||||
fi
|
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success recursive '
|
test_expect_success recursive '
|
||||||
|
@ -58,14 +53,9 @@ test_expect_success recursive '
|
||||||
rm -f a* m* &&
|
rm -f a* m* &&
|
||||||
git reset --hard anchor &&
|
git reset --hard anchor &&
|
||||||
|
|
||||||
if git merge -s recursive main
|
test_must_fail git merge -s recursive main &&
|
||||||
then
|
git ls-files -s >current &&
|
||||||
echo Oops, should not have succeeded
|
test_cmp expect current
|
||||||
false
|
|
||||||
else
|
|
||||||
git ls-files -s >current &&
|
|
||||||
test_cmp expect current
|
|
||||||
fi
|
|
||||||
'
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|
Loading…
Reference in a new issue