@matheusbsbs / matheus-bagliano / commits / 1e368681bd
Fork 0

t7501: always use test_cmp instead of diff

This should make the output more readable (by default using diff -u) when some tests fail. Also changed the diff order from "current expected" to "expected current". Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Miklos Vajna committed Sep 10, 2008 at 19:32 UTC 1e368681bd8c35202b91f8998e07d8bbb3de6c7c
1 file changed +6 -6
t/t7501-commit.sh
+6 -6
@@ -141,7 +141,7 @@ EOF
141
142 test_expect_success \
143 'validate git rev-list output.' \
144 - 'diff current expected'
144 + 'test_cmp expected current'
145
146 test_expect_success 'partial commit that involves removal (1)' '
147
@@ -151,7 +151,7 @@ test_expect_success 'partial commit that involves removal (1)' '
151 git commit -m "Partial: add elif" elif &&
152 git diff-tree --name-status HEAD^ HEAD >current &&
153 echo "A elif" >expected &&
154 - diff expected current
154 + test_cmp expected current
155
156 '
157
@@ -160,7 +160,7 @@ test_expect_success 'partial commit that involves removal (2)' '
160 git commit -m "Partial: remove file" file &&
161 git diff-tree --name-status HEAD^ HEAD >current &&
162 echo "D file" >expected &&
163 - diff expected current
163 + test_cmp expected current
164
165 '
166
@@ -171,7 +171,7 @@ test_expect_success 'partial commit that involves removal (3)' '
171 git commit -m "Partial: modify elif" elif &&
172 git diff-tree --name-status HEAD^ HEAD >current &&
173 echo "M elif" >expected &&
174 - diff expected current
174 + test_cmp expected current
175
176 '
177
@@ -187,7 +187,7 @@ test_expect_success 'amend commit to fix author' '
187 expected &&
188 git commit --amend --author="$author" &&
189 git cat-file -p HEAD > current &&
190 - diff expected current
190 + test_cmp expected current
191
192 '
193
@@ -256,7 +256,7 @@ test_expect_success 'amend commit to fix author' '
256 expected &&
257 git commit --amend --author="$author" &&
258 git cat-file -p HEAD > current &&
259 - diff expected current
259 + test_cmp expected current
260
261 '
262