@matheusbsbs / matheus-bagliano / commits / 5f35afadb0
Fork 0

t7604-merge-custom-message: shift expected output creation

Squash in a minor rename too. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Tay Ray Chuan committed May 11, 2010 at 01:17 UTC 5f35afadb032e1d2585f6f0246bf05f2e4e49c27
1 file changed +8 -4
t/t7604-merge-custom-message.sh
+8 -4
@@ -6,6 +6,10 @@ Testing merge when using a custom message for the merge commit.'
6
7 . ./test-lib.sh
8
9 +create_merge_msgs() {
10 + echo >exp.subject "custom message"
11 +}
12 +
13 test_expect_success 'setup' '
14 echo c0 > c0.c &&
15 git add c0.c &&
@@ -19,16 +23,16 @@ test_expect_success 'setup' '
23 echo c2 > c2.c &&
24 git add c2.c &&
25 git commit -m c2 &&
22 - git tag c2
26 + git tag c2 &&
27 + create_merge_msgs
28 '
29
30
31 test_expect_success 'merge c2 with a custom message' '
32 git reset --hard c1 &&
28 - echo >expected "custom message" &&
29 - git merge -m "custom message" c2 &&
33 + git merge -m "$(cat exp.subject)" c2 &&
34 git cat-file commit HEAD | sed -e "1,/^$/d" >actual &&
31 - test_cmp expected actual
35 + test_cmp exp.subject actual
36 '
37
38 test_done