t7609-merge-co-error-msgs: test non-fast forward case too.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Matthieu Moy committed
Sep 3, 2010 at 17:25 UTC
c5978a507ca20b12008724f78237784193fb9489
1 file changed
+10
-2
t/t7609-merge-co-error-msgs.sh
+10
-2
@@ -34,9 +34,17 @@ error: The following untracked working tree files would be overwritten by merge:
34
Please move or remove them before you can merge.
35
EOF
36
37
-test_expect_success 'untracked files overwritten by merge' '
37
+test_expect_success 'untracked files overwritten by merge (fast and non-fast forward)' '
38
test_must_fail git merge branch 2>out &&
39
- test_cmp out expect
39
+ test_cmp out expect &&
40
+ git commit --allow-empty -m empty &&
41
+ (
42
+ GIT_MERGE_VERBOSITY=0 &&
43
+ export GIT_MERGE_VERBOSITY &&
44
+ test_must_fail git merge branch 2>out2
45
+ ) &&
46
+ test_cmp out2 expect &&
47
+ git reset --hard HEAD^
48
'
49
50
cat >expect <<\EOF