@@ -19,17 +19,33 @@ test_expect_success 'preparation' '
19
19
git commit -m message "$name"
20
20
'
21
21
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
+
22
31
while read cmd args
23
32
do
24
- cat > expect << -'EOF '
33
+ cat > expect80 << -'EOF '
25
34
...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
26
35
EOF
27
36
test_expect_success " $cmd : small change with long name gives more space to the name" '
28
37
git $cmd $args >output &&
29
38
grep " | " output >actual &&
30
- test_cmp expect actual
39
+ test_cmp expect80 actual
31
40
'
41
+ done << \EOF
42
+ diff HEAD^ HEAD --stat
43
+ show --stat
44
+ log -1 --stat
45
+ EOF
32
46
47
+ while read cmd args
48
+ do
33
49
cat > expect << -'EOF '
34
50
...aaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
35
51
EOF
@@ -79,11 +95,11 @@ test_expect_success 'preparation for big change tests' '
79
95
git commit -m message abcd
80
96
'
81
97
82
- cat > expect80 << 'EOF '
83
- abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
98
+ cat > expect72 << 'EOF '
99
+ abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
84
100
EOF
85
- cat > expect80 -graph << 'EOF '
86
- | abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
101
+ cat > expect72 -graph << 'EOF '
102
+ | abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
87
103
EOF
88
104
cat > expect200 << 'EOF '
89
105
abcd | 1000 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
107
123
test_cmp "$expect-graph" actual
108
124
'
109
125
done << \EOF
110
- ignores expect80 format-patch -1 --stdout
126
+ ignores expect72 format-patch -1 --stdout
111
127
respects expect200 diff HEAD^ HEAD --stat
112
128
respects expect200 show --stat
113
129
respects expect200 log -1 --stat
135
151
test_cmp "$expect-graph" actual
136
152
'
137
153
done << \EOF
138
- ignores expect80 format-patch -1 --stdout
154
+ ignores expect72 format-patch -1 --stdout
139
155
respects expect40 diff HEAD^ HEAD --stat
140
156
respects expect40 show --stat
141
157
respects expect40 log -1 --stat
163
179
test_cmp "$expect-graph" actual
164
180
'
165
181
done << \EOF
166
- ignores expect80 format-patch -1 --stdout
182
+ ignores expect72 format-patch -1 --stdout
167
183
respects expect40 diff HEAD^ HEAD --stat
168
184
respects expect40 show --stat
169
185
respects expect40 log -1 --stat
@@ -250,11 +266,11 @@ show --stat
250
266
log -1 --stat
251
267
EOF
252
268
253
- cat > expect80 << 'EOF '
254
- ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++ +++++++++++++++++
269
+ cat > expect72 << 'EOF '
270
+ ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++
255
271
EOF
256
- cat > expect80 -graph << 'EOF '
257
- | ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++ +++++++++++++++++
272
+ cat > expect72 -graph << 'EOF '
273
+ | ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++
258
274
EOF
259
275
cat > expect200 << 'EOF '
260
276
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
278
294
test_cmp "$expect-graph" actual
279
295
'
280
296
done << \EOF
281
- ignores expect80 format-patch -1 --stdout
297
+ ignores expect72 format-patch -1 --stdout
282
298
respects expect200 diff HEAD^ HEAD --stat
283
299
respects expect200 show --stat
284
300
respects expect200 log -1 --stat
308
324
test_cmp "$expect-graph" actual
309
325
'
310
326
done << \EOF
311
- ignores expect80 format-patch -1 --stdout
327
+ ignores expect72 format-patch -1 --stdout
312
328
respects expect1 diff HEAD^ HEAD --stat
313
329
respects expect1 show --stat
314
330
respects expect1 log -1 --stat
0 commit comments