@@ -19,17 +19,33 @@ test_expect_success 'preparation' '
1919 git commit -m message "$name"
2020'
2121
22+ cat > expect72 << -'EOF '
23+ ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
24+ EOF
25+ test_expect_success " format-patch: small change with long name gives more space to the name" '
26+ git format-patch -1 --stdout >output &&
27+ grep " | " output >actual &&
28+ test_cmp expect72 actual
29+ '
30+
2231while read cmd args
2332do
24- cat > expect << -'EOF '
33+ cat > expect80 << -'EOF '
2534 ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
2635 EOF
2736 test_expect_success " $cmd : small change with long name gives more space to the name" '
2837 git $cmd $args >output &&
2938 grep " | " output >actual &&
30- test_cmp expect actual
39+ test_cmp expect80 actual
3140 '
41+ done << \EOF
42+ diff HEAD^ HEAD --stat
43+ show --stat
44+ log -1 --stat
45+ EOF
3246
47+ while read cmd args
48+ do
3349 cat > expect << -'EOF '
3450 ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
3551 EOF
@@ -79,11 +95,11 @@ test_expect_success 'preparation for big change tests' '
7995 git commit -m message abcd
8096'
8197
82- cat > expect80 << 'EOF '
83- abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
98+ cat > expect72 << 'EOF '
99+ abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
84100EOF
85- cat > expect80 -graph << 'EOF '
86- | abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
101+ cat > expect72 -graph << 'EOF '
102+ | abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
87103EOF
88104cat > expect200 << 'EOF '
89105 abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
107123 test_cmp "$expect-graph" actual
108124 '
109125done << \EOF
110- ignores expect80 format-patch -1 --stdout
126+ ignores expect72 format-patch -1 --stdout
111127respects expect200 diff HEAD^ HEAD --stat
112128respects expect200 show --stat
113129respects expect200 log -1 --stat
135151 test_cmp "$expect-graph" actual
136152 '
137153done << \EOF
138- ignores expect80 format-patch -1 --stdout
154+ ignores expect72 format-patch -1 --stdout
139155respects expect40 diff HEAD^ HEAD --stat
140156respects expect40 show --stat
141157respects expect40 log -1 --stat
163179 test_cmp "$expect-graph" actual
164180 '
165181done << \EOF
166- ignores expect80 format-patch -1 --stdout
182+ ignores expect72 format-patch -1 --stdout
167183respects expect40 diff HEAD^ HEAD --stat
168184respects expect40 show --stat
169185respects expect40 log -1 --stat
@@ -250,11 +266,11 @@ show --stat
250266log -1 --stat
251267EOF
252268
253- cat > expect80 << 'EOF '
254- ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++ +++++++++++++++++
269+ cat > expect72 << 'EOF '
270+ ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++
255271EOF
256- cat > expect80 -graph << 'EOF '
257- | ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++ +++++++++++++++++
272+ cat > expect72 -graph << 'EOF '
273+ | ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++
258274EOF
259275cat > expect200 << 'EOF '
260276 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
278294 test_cmp "$expect-graph" actual
279295 '
280296done << \EOF
281- ignores expect80 format-patch -1 --stdout
297+ ignores expect72 format-patch -1 --stdout
282298respects expect200 diff HEAD^ HEAD --stat
283299respects expect200 show --stat
284300respects expect200 log -1 --stat
308324 test_cmp "$expect-graph" actual
309325 '
310326done << \EOF
311- ignores expect80 format-patch -1 --stdout
327+ ignores expect72 format-patch -1 --stdout
312328respects expect1 diff HEAD^ HEAD --stat
313329respects expect1 show --stat
314330respects expect1 log -1 --stat
0 commit comments