diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t3030-merge-recursive.sh | 11 | ||||
-rwxr-xr-x | t/t7600-merge.sh | 9 | ||||
-rwxr-xr-x | t/t7605-merge-resolve.sh | 4 |
3 files changed, 23 insertions, 1 deletions
diff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh index aff360303a..f2880152b0 100755 --- a/t/t3030-merge-recursive.sh +++ b/t/t3030-merge-recursive.sh @@ -269,6 +269,17 @@ test_expect_success 'merge-recursive result' ' ' +test_expect_success 'fail if the index has unresolved entries' ' + + rm -fr [abcd] && + git checkout -f "$c1" && + + test_must_fail git merge "$c5" && + test_must_fail git merge "$c5" 2> out && + grep "You are in the middle of a conflicted merge" out + +' + test_expect_success 'merge-recursive remove conflict' ' rm -fr [abcd] && diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh index fee8fb77d4..dbc90bc416 100755 --- a/t/t7600-merge.sh +++ b/t/t7600-merge.sh @@ -498,4 +498,13 @@ test_expect_success 'merge fast-forward in a dirty tree' ' test_debug 'gitk --all' +test_expect_success 'in-index merge' ' + git reset --hard c0 && + git merge --no-ff -s resolve c1 > out && + grep "Wonderful." out && + verify_parents $c0 $c1 +' + +test_debug 'gitk --all' + test_done diff --git a/t/t7605-merge-resolve.sh b/t/t7605-merge-resolve.sh index ee21a107fd..f1f86ddb23 100755 --- a/t/t7605-merge-resolve.sh +++ b/t/t7605-merge-resolve.sh @@ -36,7 +36,9 @@ test_expect_success 'merge c1 to c2' ' git diff --exit-code && test -f c0.c && test -f c1.c && - test -f c2.c + test -f c2.c && + test 3 = $(git ls-tree -r HEAD | wc -l) && + test 3 = $(git ls-files | wc -l) ' test_expect_success 'merge c2 to c3 (fails)' ' |