mirror of
https://github.com/git/git
synced 2024-08-28 03:59:25 +00:00
t6034: use modern test_* helpers
These say roughly the same thing as the hand-rolled messages. We do lose the "merge did not complete" debug message, but merge and write-tree are prefectly capable of writing useful error messages when they fail. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
95508a0751
commit
2f69de5b4b
|
@ -73,33 +73,12 @@ test_expect_success 'merge white into red (A->B,M->N)' \
|
||||||
'
|
'
|
||||||
git checkout -b red-white red &&
|
git checkout -b red-white red &&
|
||||||
git merge white &&
|
git merge white &&
|
||||||
git write-tree >/dev/null || {
|
git write-tree &&
|
||||||
echo "BAD: merge did not complete"
|
test_path_is_file B &&
|
||||||
return 1
|
test_path_is_file N &&
|
||||||
}
|
test_path_is_file R &&
|
||||||
|
test_path_is_missing A &&
|
||||||
test -f B || {
|
test_path_is_missing M
|
||||||
echo "BAD: B does not exist in working directory"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
test -f N || {
|
|
||||||
echo "BAD: N does not exist in working directory"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
test -f R || {
|
|
||||||
echo "BAD: R does not exist in working directory"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
test -f A && {
|
|
||||||
echo "BAD: A still exists in working directory"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
test -f M && {
|
|
||||||
echo "BAD: M still exists in working directory"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
'
|
'
|
||||||
|
|
||||||
# This test broke in 8371234ecaaf6e14fe3f2082a855eff1bbd79ae9
|
# This test broke in 8371234ecaaf6e14fe3f2082a855eff1bbd79ae9
|
||||||
|
@ -108,32 +87,13 @@ test_expect_success 'merge blue into white (A->B, mod A, A untracked)' \
|
||||||
git checkout -b white-blue white &&
|
git checkout -b white-blue white &&
|
||||||
echo dirty >A &&
|
echo dirty >A &&
|
||||||
git merge blue &&
|
git merge blue &&
|
||||||
git write-tree >/dev/null || {
|
git write-tree &&
|
||||||
echo "BAD: merge did not complete"
|
test_path_is_file A &&
|
||||||
return 1
|
echo dirty >expect &&
|
||||||
}
|
test_cmp expect A &&
|
||||||
|
test_path_is_file B &&
|
||||||
test -f A || {
|
test_path_is_file N &&
|
||||||
echo "BAD: A does not exist in working directory"
|
test_path_is_missing M
|
||||||
return 1
|
|
||||||
}
|
|
||||||
test `cat A` = dirty || {
|
|
||||||
echo "BAD: A content is wrong"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
test -f B || {
|
|
||||||
echo "BAD: B does not exist in working directory"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
test -f N || {
|
|
||||||
echo "BAD: N does not exist in working directory"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
test -f M && {
|
|
||||||
echo "BAD: M still exists in working directory"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
'
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|
Loading…
Reference in a new issue