@@ -51,7 +51,9 @@ test_expect_success \
5151 treeM=$(git write-tree) &&
5252 echo treeM $treeM &&
5353 git ls-tree $treeM &&
54- sum bozbar frotz nitfol >M.sum &&
54+ cp bozbar bozbar.M &&
55+ cp frotz frotz.M &&
56+ cp nitfol nitfol.M &&
5557 git diff-tree $treeH $treeM'
5658
5759test_expect_success \
@@ -61,8 +63,9 @@ test_expect_success \
6163 read_tree_u_must_succeed -m -u $treeH $treeM &&
6264 git ls-files --stage >1-3.out &&
6365 cmp M.out 1-3.out &&
64- sum bozbar frotz nitfol >actual3.sum &&
65- cmp M.sum actual3.sum &&
66+ test_cmp bozbar.M bozbar &&
67+ test_cmp frotz.M frotz &&
68+ test_cmp nitfol.M nitfol &&
6669 check_cache_at bozbar clean &&
6770 check_cache_at frotz clean &&
6871 check_cache_at nitfol clean'
@@ -79,8 +82,9 @@ test_expect_success \
7982 test_might_fail git diff -U0 --no-index M.out 4.out >4diff.out &&
8083 compare_change 4diff.out expected &&
8184 check_cache_at yomin clean &&
82- sum bozbar frotz nitfol >actual4.sum &&
83- cmp M.sum actual4.sum &&
85+ test_cmp bozbar.M bozbar &&
86+ test_cmp frotz.M frotz &&
87+ test_cmp nitfol.M nitfol &&
8488 echo yomin >yomin1 &&
8589 diff yomin yomin1 &&
8690 rm -f yomin1'
@@ -98,8 +102,9 @@ test_expect_success \
98102 test_might_fail git diff -U0 --no-index M.out 5.out >5diff.out &&
99103 compare_change 5diff.out expected &&
100104 check_cache_at yomin dirty &&
101- sum bozbar frotz nitfol >actual5.sum &&
102- cmp M.sum actual5.sum &&
105+ test_cmp bozbar.M bozbar &&
106+ test_cmp frotz.M frotz &&
107+ test_cmp nitfol.M nitfol &&
103108 : dirty index should have prevented -u from checking it out. &&
104109 echo yomin yomin >yomin1 &&
105110 diff yomin yomin1 &&
@@ -115,8 +120,9 @@ test_expect_success \
115120 git ls-files --stage >6.out &&
116121 test_cmp M.out 6.out &&
117122 check_cache_at frotz clean &&
118- sum bozbar frotz nitfol >actual3.sum &&
119- cmp M.sum actual3.sum &&
123+ test_cmp bozbar.M bozbar &&
124+ test_cmp frotz.M frotz &&
125+ test_cmp nitfol.M nitfol &&
120126 echo frotz >frotz1 &&
121127 diff frotz frotz1 &&
122128 rm -f frotz1'
@@ -132,8 +138,8 @@ test_expect_success \
132138 git ls-files --stage >7.out &&
133139 test_cmp M.out 7.out &&
134140 check_cache_at frotz dirty &&
135- sum bozbar frotz nitfol >actual7.sum &&
136- if cmp M.sum actual7.sum; then false; else :; fi &&
141+ test_cmp bozbar.M bozbar &&
142+ test_cmp nitfol.M nitfol &&
137143 : dirty index should have prevented -u from checking it out. &&
138144 echo frotz frotz >frotz1 &&
139145 diff frotz frotz1 &&
@@ -165,8 +171,10 @@ test_expect_success \
165171 read_tree_u_must_succeed -m -u $treeH $treeM &&
166172 git ls-files --stage >10.out &&
167173 cmp M.out 10.out &&
168- sum bozbar frotz nitfol >actual10.sum &&
169- cmp M.sum actual10.sum'
174+ test_cmp bozbar.M bozbar &&
175+ test_cmp frotz.M frotz &&
176+ test_cmp nitfol.M nitfol
177+ '
170178
171179test_expect_success \
172180 ' 11 - dirty path removed.' \
@@ -209,11 +217,8 @@ test_expect_success \
209217 git ls-files --stage >14.out &&
210218 test_must_fail git diff -U0 --no-index M.out 14.out >14diff.out &&
211219 compare_change 14diff.out expected &&
212- sum bozbar frotz >actual14.sum &&
213- grep -v nitfol M.sum > expected14.sum &&
214- cmp expected14.sum actual14.sum &&
215- sum bozbar frotz nitfol >actual14a.sum &&
216- if cmp M.sum actual14a.sum; then false; else :; fi &&
220+ test_cmp bozbar.M bozbar &&
221+ test_cmp frotz.M frotz &&
217222 check_cache_at nitfol clean &&
218223 echo nitfol nitfol >nitfol1 &&
219224 diff nitfol nitfol1 &&
@@ -231,11 +236,8 @@ test_expect_success \
231236 test_must_fail git diff -U0 --no-index M.out 15.out >15diff.out &&
232237 compare_change 15diff.out expected &&
233238 check_cache_at nitfol dirty &&
234- sum bozbar frotz >actual15.sum &&
235- grep -v nitfol M.sum > expected15.sum &&
236- cmp expected15.sum actual15.sum &&
237- sum bozbar frotz nitfol >actual15a.sum &&
238- if cmp M.sum actual15a.sum; then false; else :; fi &&
239+ test_cmp bozbar.M bozbar &&
240+ test_cmp frotz.M frotz &&
239241 echo nitfol nitfol nitfol >nitfol1 &&
240242 diff nitfol nitfol1 &&
241243 rm -f nitfol1'
@@ -267,8 +269,10 @@ test_expect_success \
267269 git ls-files --stage >18.out &&
268270 test_cmp M.out 18.out &&
269271 check_cache_at bozbar clean &&
270- sum bozbar frotz nitfol >actual18.sum &&
271- cmp M.sum actual18.sum'
272+ test_cmp bozbar.M bozbar &&
273+ test_cmp frotz.M frotz &&
274+ test_cmp nitfol.M nitfol
275+ '
272276
273277test_expect_success \
274278 ' 19 - local change already having a good result, further modified.' \
@@ -281,11 +285,8 @@ test_expect_success \
281285 git ls-files --stage >19.out &&
282286 test_cmp M.out 19.out &&
283287 check_cache_at bozbar dirty &&
284- sum frotz nitfol >actual19.sum &&
285- grep -v bozbar M.sum > expected19.sum &&
286- cmp expected19.sum actual19.sum &&
287- sum bozbar frotz nitfol >actual19a.sum &&
288- if cmp M.sum actual19a.sum; then false; else :; fi &&
288+ test_cmp frotz.M frotz &&
289+ test_cmp nitfol.M nitfol &&
289290 echo gnusto gnusto >bozbar1 &&
290291 diff bozbar bozbar1 &&
291292 rm -f bozbar1'
@@ -300,8 +301,10 @@ test_expect_success \
300301 git ls-files --stage >20.out &&
301302 test_cmp M.out 20.out &&
302303 check_cache_at bozbar clean &&
303- sum bozbar frotz nitfol >actual20.sum &&
304- cmp M.sum actual20.sum'
304+ test_cmp bozbar.M bozbar &&
305+ test_cmp frotz.M frotz &&
306+ test_cmp nitfol.M nitfol
307+ '
305308
306309test_expect_success \
307310 ' 21 - no local change, dirty cache.' \
0 commit comments