@matheusbsbs / matheus-bagliano / commits / 2b14d07237
Fork 0

t/: Replace diff [-u|-U0] with test_cmp to allow compilation with old diff

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brandon Casey committed Jul 22, 2008 at 16:17 UTC 2b14d07237fb6a52a55e89dde027e40aa627789d
3 files changed +12 -12
t/t0002-gitfile.sh
+1 -1
@@ -66,7 +66,7 @@ test_expect_success 'check hash-object' '
66
67 test_expect_success 'check cat-file' '
68 git cat-file blob $SHA >actual &&
69 - diff -u bar actual
69 + test_cmp bar actual
70 '
71
72 test_expect_success 'check update-index' '
t/t1002-read-tree-m-u-2way.sh
+6 -6
@@ -112,7 +112,7 @@ test_expect_success \
112 git update-index --add frotz &&
113 git read-tree -m -u $treeH $treeM &&
114 git ls-files --stage >6.out &&
115 - diff -U0 M.out 6.out &&
115 + test_cmp M.out 6.out &&
116 check_cache_at frotz clean &&
117 sum bozbar frotz nitfol >actual3.sum &&
118 cmp M.sum actual3.sum &&
@@ -129,7 +129,7 @@ test_expect_success \
129 echo frotz frotz >frotz &&
130 git read-tree -m -u $treeH $treeM &&
131 git ls-files --stage >7.out &&
132 - diff -U0 M.out 7.out &&
132 + test_cmp M.out 7.out &&
133 check_cache_at frotz dirty &&
134 sum bozbar frotz nitfol >actual7.sum &&
135 if cmp M.sum actual7.sum; then false; else :; fi &&
@@ -264,7 +264,7 @@ test_expect_success \
264 git update-index --add bozbar &&
265 git read-tree -m -u $treeH $treeM &&
266 git ls-files --stage >18.out &&
267 - diff -U0 M.out 18.out &&
267 + test_cmp M.out 18.out &&
268 check_cache_at bozbar clean &&
269 sum bozbar frotz nitfol >actual18.sum &&
270 cmp M.sum actual18.sum'
@@ -278,7 +278,7 @@ test_expect_success \
278 echo gnusto gnusto >bozbar &&
279 git read-tree -m -u $treeH $treeM &&
280 git ls-files --stage >19.out &&
281 - diff -U0 M.out 19.out &&
281 + test_cmp M.out 19.out &&
282 check_cache_at bozbar dirty &&
283 sum frotz nitfol >actual19.sum &&
284 grep -v bozbar M.sum > expected19.sum &&
@@ -297,7 +297,7 @@ test_expect_success \
297 git update-index --add bozbar &&
298 git read-tree -m -u $treeH $treeM &&
299 git ls-files --stage >20.out &&
300 - diff -U0 M.out 20.out &&
300 + test_cmp M.out 20.out &&
301 check_cache_at bozbar clean &&
302 sum bozbar frotz nitfol >actual20.sum &&
303 cmp M.sum actual20.sum'
@@ -338,7 +338,7 @@ test_expect_success \
338 git update-index --add DF &&
339 git read-tree -m -u $treeDF $treeDFDF &&
340 git ls-files --stage >DFDFcheck.out &&
341 - diff -U0 DFDF.out DFDFcheck.out &&
341 + test_cmp DFDF.out DFDFcheck.out &&
342 check_cache_at DF/DF clean'
343
344 test_done
t/t2201-add-update-typechange.sh
+5 -5
@@ -106,12 +106,12 @@ test_expect_success modify '
106
107 test_expect_success diff-files '
108 git diff-files --raw >actual &&
109 - diff -u expect-files actual
109 + test_cmp expect-files actual
110 '
111
112 test_expect_success diff-index '
113 git diff-index --raw HEAD -- >actual &&
114 - diff -u expect-index actual
114 + test_cmp expect-index actual
115 '
116
117 test_expect_success 'add -u' '
@@ -119,7 +119,7 @@ test_expect_success 'add -u' '
119 cp -p ".git/index" ".git/saved-index" &&
120 git add -u &&
121 git ls-files -s >actual &&
122 - diff -u expect-final actual
122 + test_cmp expect-final actual
123 '
124
125 test_expect_success 'commit -a' '
@@ -130,11 +130,11 @@ test_expect_success 'commit -a' '
130 fi &&
131 git commit -m "second" -a &&
132 git ls-files -s >actual &&
133 - diff -u expect-final actual &&
133 + test_cmp expect-final actual &&
134 rm -f .git/index &&
135 git read-tree HEAD &&
136 git ls-files -s >actual &&
137 - diff -u expect-final actual
137 + test_cmp expect-final actual
138 '
139
140 test_done