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>

Jeff King committed Mar 20, 2015 at 06:13 UTC 2f69de5b4be64100d919b2ac858ca60263a59bb2
1 file changed +13 -53
t/t6034-merge-rename-nocruft.sh
+13 -53
@@ -73,33 +73,12 @@ test_expect_success 'merge white into red (A->B,M->N)' \
73 '
74 git checkout -b red-white red &&
75 git merge white &&
76 - git write-tree >/dev/null || {
77 - echo "BAD: merge did not complete"
78 - return 1
79 - }
80 -
81 - test -f B || {
82 - echo "BAD: B does not exist in working directory"
83 - return 1
84 - }
85 - test -f N || {
86 - echo "BAD: N does not exist in working directory"
87 - return 1
88 - }
89 - test -f R || {
90 - echo "BAD: R does not exist in working directory"
91 - return 1
92 - }
93 -
94 - test -f A && {
95 - echo "BAD: A still exists in working directory"
96 - return 1
97 - }
98 - test -f M && {
99 - echo "BAD: M still exists in working directory"
100 - return 1
101 - }
102 - return 0
76 + git write-tree &&
77 + test_path_is_file B &&
78 + test_path_is_file N &&
79 + test_path_is_file R &&
80 + test_path_is_missing A &&
81 + test_path_is_missing M
82 '
83
84 # This test broke in 8371234ecaaf6e14fe3f2082a855eff1bbd79ae9
@@ -108,32 +87,13 @@ test_expect_success 'merge blue into white (A->B, mod A, A untracked)' \
87 git checkout -b white-blue white &&
88 echo dirty >A &&
89 git merge blue &&
111 - git write-tree >/dev/null || {
112 - echo "BAD: merge did not complete"
113 - return 1
114 - }
115 -
116 - test -f A || {
117 - echo "BAD: A does not exist in working directory"
118 - return 1
119 - }
120 - test `cat A` = dirty || {
121 - echo "BAD: A content is wrong"
122 - return 1
123 - }
124 - test -f B || {
125 - echo "BAD: B does not exist in working directory"
126 - return 1
127 - }
128 - test -f N || {
129 - echo "BAD: N does not exist in working directory"
130 - return 1
131 - }
132 - test -f M && {
133 - echo "BAD: M still exists in working directory"
134 - return 1
135 - }
136 - return 0
90 + git write-tree &&
91 + test_path_is_file A &&
92 + echo dirty >expect &&
93 + test_cmp expect A &&
94 + test_path_is_file B &&
95 + test_path_is_file N &&
96 + test_path_is_missing M
97 '
98
99 test_done