Skip to content

Commit f3445f7

Browse files
ashumkingitster
authored andcommitted
t4205 (log-pretty-formats): revert back single quotes
In previuos commit de6029a (pretty: Add failing tests: --format output should honor logOutputEncoding, 2013-06-26) single quotes were replaced with double quotes to make "$(commit_msg)" expression in heredoc to work. The same effect can be achieved by using "EOF" as a heredoc delimiter instead of "\EOF". Signed-off-by: Alexey Shumkin <[email protected]> Suggested-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 14332bc commit f3445f7

File tree

1 file changed

+53
-53
lines changed

1 file changed

+53
-53
lines changed

t/t4205-log-pretty-formats.sh

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -145,174 +145,174 @@ test_expect_success 'setup more commits' '
145145
head4=$(git rev-parse --verify --short HEAD~3)
146146
'
147147

148-
test_expect_success 'left alignment formatting' "
149-
git log --pretty='format:%<(40)%s' >actual &&
148+
test_expect_success 'left alignment formatting' '
149+
git log --pretty="format:%<(40)%s" >actual &&
150150
# complete the incomplete line at the end
151151
echo >>actual &&
152-
qz_to_tab_space <<\EOF >expected &&
152+
qz_to_tab_space <<EOF >expected &&
153153
message two Z
154154
message one Z
155155
add bar Z
156156
$(commit_msg) Z
157157
EOF
158158
test_cmp expected actual
159-
"
159+
'
160160

161-
test_expect_success 'left alignment formatting at the nth column' "
162-
git log --pretty='format:%h %<|(40)%s' >actual &&
161+
test_expect_success 'left alignment formatting at the nth column' '
162+
git log --pretty="format:%h %<|(40)%s" >actual &&
163163
# complete the incomplete line at the end
164164
echo >>actual &&
165-
qz_to_tab_space <<\EOF >expected &&
165+
qz_to_tab_space <<EOF >expected &&
166166
$head1 message two Z
167167
$head2 message one Z
168168
$head3 add bar Z
169169
$head4 $(commit_msg) Z
170170
EOF
171171
test_cmp expected actual
172-
"
172+
'
173173

174-
test_expect_success 'left alignment formatting with no padding' "
175-
git log --pretty='format:%<(1)%s' >actual &&
174+
test_expect_success 'left alignment formatting with no padding' '
175+
git log --pretty="format:%<(1)%s" >actual &&
176176
# complete the incomplete line at the end
177177
echo >>actual &&
178-
cat <<\EOF >expected &&
178+
cat <<EOF >expected &&
179179
message two
180180
message one
181181
add bar
182182
$(commit_msg)
183183
EOF
184184
test_cmp expected actual
185-
"
185+
'
186186

187-
test_expect_success 'left alignment formatting with trunc' "
188-
git log --pretty='format:%<(10,trunc)%s' >actual &&
187+
test_expect_success 'left alignment formatting with trunc' '
188+
git log --pretty="format:%<(10,trunc)%s" >actual &&
189189
# complete the incomplete line at the end
190190
echo >>actual &&
191-
qz_to_tab_space <<\EOF >expected &&
191+
qz_to_tab_space <<EOF >expected &&
192192
message ..
193193
message ..
194194
add bar Z
195195
$(commit_msg "" "8" "..*$")
196196
EOF
197197
test_cmp expected actual
198-
"
198+
'
199199

200-
test_expect_success 'left alignment formatting with ltrunc' "
201-
git log --pretty='format:%<(10,ltrunc)%s' >actual &&
200+
test_expect_success 'left alignment formatting with ltrunc' '
201+
git log --pretty="format:%<(10,ltrunc)%s" >actual &&
202202
# complete the incomplete line at the end
203203
echo >>actual &&
204-
qz_to_tab_space <<\EOF >expected &&
204+
qz_to_tab_space <<EOF >expected &&
205205
..sage two
206206
..sage one
207207
add bar Z
208208
$(commit_msg "" "0" ".\{11\}")
209209
EOF
210210
test_cmp expected actual
211-
"
211+
'
212212

213-
test_expect_success 'left alignment formatting with mtrunc' "
214-
git log --pretty='format:%<(10,mtrunc)%s' >actual &&
213+
test_expect_success 'left alignment formatting with mtrunc' '
214+
git log --pretty="format:%<(10,mtrunc)%s" >actual &&
215215
# complete the incomplete line at the end
216216
echo >>actual &&
217-
qz_to_tab_space <<\EOF >expected &&
217+
qz_to_tab_space <<EOF >expected &&
218218
mess.. two
219219
mess.. one
220220
add bar Z
221221
$(commit_msg "" "4" ".\{11\}")
222222
EOF
223223
test_cmp expected actual
224-
"
224+
'
225225

226-
test_expect_success 'right alignment formatting' "
227-
git log --pretty='format:%>(40)%s' >actual &&
226+
test_expect_success 'right alignment formatting' '
227+
git log --pretty="format:%>(40)%s" >actual &&
228228
# complete the incomplete line at the end
229229
echo >>actual &&
230-
qz_to_tab_space <<\EOF >expected &&
230+
qz_to_tab_space <<EOF >expected &&
231231
Z message two
232232
Z message one
233233
Z add bar
234234
Z $(commit_msg)
235235
EOF
236236
test_cmp expected actual
237-
"
237+
'
238238

239-
test_expect_success 'right alignment formatting at the nth column' "
240-
git log --pretty='format:%h %>|(40)%s' >actual &&
239+
test_expect_success 'right alignment formatting at the nth column' '
240+
git log --pretty="format:%h %>|(40)%s" >actual &&
241241
# complete the incomplete line at the end
242242
echo >>actual &&
243-
qz_to_tab_space <<\EOF >expected &&
243+
qz_to_tab_space <<EOF >expected &&
244244
$head1 message two
245245
$head2 message one
246246
$head3 add bar
247247
$head4 $(commit_msg)
248248
EOF
249249
test_cmp expected actual
250-
"
250+
'
251251

252-
test_expect_success 'right alignment formatting with no padding' "
253-
git log --pretty='format:%>(1)%s' >actual &&
252+
test_expect_success 'right alignment formatting with no padding' '
253+
git log --pretty="format:%>(1)%s" >actual &&
254254
# complete the incomplete line at the end
255255
echo >>actual &&
256-
cat <<\EOF >expected &&
256+
cat <<EOF >expected &&
257257
message two
258258
message one
259259
add bar
260260
$(commit_msg)
261261
EOF
262262
test_cmp expected actual
263-
"
263+
'
264264

265-
test_expect_success 'center alignment formatting' "
266-
git log --pretty='format:%><(40)%s' >actual &&
265+
test_expect_success 'center alignment formatting' '
266+
git log --pretty="format:%><(40)%s" >actual &&
267267
# complete the incomplete line at the end
268268
echo >>actual &&
269-
qz_to_tab_space <<\EOF >expected &&
269+
qz_to_tab_space <<EOF >expected &&
270270
Z message two Z
271271
Z message one Z
272272
Z add bar Z
273273
Z $(commit_msg) Z
274274
EOF
275275
test_cmp expected actual
276-
"
276+
'
277277

278-
test_expect_success 'center alignment formatting at the nth column' "
279-
git log --pretty='format:%h %><|(40)%s' >actual &&
278+
test_expect_success 'center alignment formatting at the nth column' '
279+
git log --pretty="format:%h %><|(40)%s" >actual &&
280280
# complete the incomplete line at the end
281281
echo >>actual &&
282-
qz_to_tab_space <<\EOF >expected &&
282+
qz_to_tab_space <<EOF >expected &&
283283
$head1 message two Z
284284
$head2 message one Z
285285
$head3 add bar Z
286286
$head4 $(commit_msg) Z
287287
EOF
288288
test_cmp expected actual
289-
"
289+
'
290290

291-
test_expect_success 'center alignment formatting with no padding' "
292-
git log --pretty='format:%><(1)%s' >actual &&
291+
test_expect_success 'center alignment formatting with no padding' '
292+
git log --pretty="format:%><(1)%s" >actual &&
293293
# complete the incomplete line at the end
294294
echo >>actual &&
295-
cat <<\EOF >expected &&
295+
cat <<EOF >expected &&
296296
message two
297297
message one
298298
add bar
299299
$(commit_msg)
300300
EOF
301301
test_cmp expected actual
302-
"
302+
'
303303

304-
test_expect_success 'left/right alignment formatting with stealing' "
305-
git commit --amend -m short --author 'long long long <[email protected]>' &&
306-
git log --pretty='format:%<(10,trunc)%s%>>(10,ltrunc)% an' >actual &&
304+
test_expect_success 'left/right alignment formatting with stealing' '
305+
git commit --amend -m short --author "long long long <[email protected]>" &&
306+
git log --pretty="format:%<(10,trunc)%s%>>(10,ltrunc)% an" >actual &&
307307
# complete the incomplete line at the end
308308
echo >>actual &&
309-
cat <<\EOF >expected &&
309+
cat <<EOF >expected &&
310310
short long long long
311311
message .. A U Thor
312312
add bar A U Thor
313313
$(commit_msg "" "8" "..*$") A U Thor
314314
EOF
315315
test_cmp expected actual
316-
"
316+
'
317317

318318
test_done

0 commit comments

Comments
 (0)