aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t7607-merge-overwrite.sh10
-rwxr-xr-xt/t7611-merge-abort.sh20
2 files changed, 24 insertions, 6 deletions
diff --git a/t/t7607-merge-overwrite.sh b/t/t7607-merge-overwrite.sh
index 5f731a117..0a9b90b33 100755
--- a/t/t7607-merge-overwrite.sh
+++ b/t/t7607-merge-overwrite.sh
@@ -150,8 +150,14 @@ test_expect_success 'will not overwrite untracked file on unborn branch' '
git rm -fr . &&
git checkout --orphan new &&
cp important c0.c &&
- test_must_fail git merge c0 2>out &&
- test_cmp out expect &&
+ test_must_fail git merge c0 2>out
+'
+
+test_expect_success C_LOCALE_OUTPUT 'will not overwrite untracked file on unborn branch: output' '
+ test_cmp out expect
+'
+
+test_expect_success 'will not overwrite untracked file on unborn branch .git/MERGE_HEAD sanity etc.' '
test_path_is_missing .git/MERGE_HEAD &&
test_cmp important c0.c
'
diff --git a/t/t7611-merge-abort.sh b/t/t7611-merge-abort.sh
index 61890bc89..cdb3f444c 100755
--- a/t/t7611-merge-abort.sh
+++ b/t/t7611-merge-abort.sh
@@ -46,8 +46,14 @@ test_expect_success 'setup' '
pre_merge_head="$(git rev-parse HEAD)"
test_expect_success 'fails without MERGE_HEAD (unstarted merge)' '
- test_must_fail git merge --abort 2>output &&
- grep -q MERGE_HEAD output &&
+ test_must_fail git merge --abort 2>output
+'
+
+test_expect_success C_LOCALE_OUTPUT 'fails without MERGE_HEAD (unstarted merge): fatal output' '
+ grep -q MERGE_HEAD output
+'
+
+test_expect_success 'fails without MERGE_HEAD (unstarted merge): .git/MERGE_HEAD sanity' '
test ! -f .git/MERGE_HEAD &&
test "$pre_merge_head" = "$(git rev-parse HEAD)"
'
@@ -57,8 +63,14 @@ test_expect_success 'fails without MERGE_HEAD (completed merge)' '
test ! -f .git/MERGE_HEAD &&
# Merge successfully completed
post_merge_head="$(git rev-parse HEAD)" &&
- test_must_fail git merge --abort 2>output &&
- grep -q MERGE_HEAD output &&
+ test_must_fail git merge --abort 2>output
+'
+
+test_expect_success C_LOCALE_OUTPUT 'fails without MERGE_HEAD (completed merge): output' '
+ grep -q MERGE_HEAD output
+'
+
+test_expect_success 'fails without MERGE_HEAD (completed merge): .git/MERGE_HEAD sanity' '
test ! -f .git/MERGE_HEAD &&
test "$post_merge_head" = "$(git rev-parse HEAD)"
'