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 <Alex.Crezoff@gmail.com> Suggested-by: Johannes Sixt <j.sixt@viscovery.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alexey Shumkin committed
Jul 5, 2013 at 16:01 UTC
f3445f781f95ca4a7d59028aa7b7457fa925f577
1 file changed
+53
-53
t/t4205-log-pretty-formats.sh
+53
-53
@@ -145,174 +145,174 @@ test_expect_success 'setup more commits' '
145
head4=$(git rev-parse --verify --short HEAD~3)
146
'
147
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 &&
150
# complete the incomplete line at the end
151
echo >>actual &&
152
- qz_to_tab_space <<\EOF >expected &&
152
+ qz_to_tab_space <<EOF >expected &&
153
message two Z
154
message one Z
155
add bar Z
156
$(commit_msg) Z
157
EOF
158
test_cmp expected actual
159
-"
159
+'
160
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 &&
163
# complete the incomplete line at the end
164
echo >>actual &&
165
- qz_to_tab_space <<\EOF >expected &&
165
+ qz_to_tab_space <<EOF >expected &&
166
$head1 message two Z
167
$head2 message one Z
168
$head3 add bar Z
169
$head4 $(commit_msg) Z
170
EOF
171
test_cmp expected actual
172
-"
172
+'
173
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 &&
176
# complete the incomplete line at the end
177
echo >>actual &&
178
- cat <<\EOF >expected &&
178
+ cat <<EOF >expected &&
179
message two
180
message one
181
add bar
182
$(commit_msg)
183
EOF
184
test_cmp expected actual
185
-"
185
+'
186
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 &&
189
# complete the incomplete line at the end
190
echo >>actual &&
191
- qz_to_tab_space <<\EOF >expected &&
191
+ qz_to_tab_space <<EOF >expected &&
192
message ..
193
message ..
194
add bar Z
195
$(commit_msg "" "8" "..*$")
196
EOF
197
test_cmp expected actual
198
-"
198
+'
199
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 &&
202
# complete the incomplete line at the end
203
echo >>actual &&
204
- qz_to_tab_space <<\EOF >expected &&
204
+ qz_to_tab_space <<EOF >expected &&
205
..sage two
206
..sage one
207
add bar Z
208
$(commit_msg "" "0" ".\{11\}")
209
EOF
210
test_cmp expected actual
211
-"
211
+'
212
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 &&
215
# complete the incomplete line at the end
216
echo >>actual &&
217
- qz_to_tab_space <<\EOF >expected &&
217
+ qz_to_tab_space <<EOF >expected &&
218
mess.. two
219
mess.. one
220
add bar Z
221
$(commit_msg "" "4" ".\{11\}")
222
EOF
223
test_cmp expected actual
224
-"
224
+'
225
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 &&
228
# complete the incomplete line at the end
229
echo >>actual &&
230
- qz_to_tab_space <<\EOF >expected &&
230
+ qz_to_tab_space <<EOF >expected &&
231
Z message two
232
Z message one
233
Z add bar
234
Z $(commit_msg)
235
EOF
236
test_cmp expected actual
237
-"
237
+'
238
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 &&
241
# complete the incomplete line at the end
242
echo >>actual &&
243
- qz_to_tab_space <<\EOF >expected &&
243
+ qz_to_tab_space <<EOF >expected &&
244
$head1 message two
245
$head2 message one
246
$head3 add bar
247
$head4 $(commit_msg)
248
EOF
249
test_cmp expected actual
250
-"
250
+'
251
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 &&
254
# complete the incomplete line at the end
255
echo >>actual &&
256
- cat <<\EOF >expected &&
256
+ cat <<EOF >expected &&
257
message two
258
message one
259
add bar
260
$(commit_msg)
261
EOF
262
test_cmp expected actual
263
-"
263
+'
264
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 &&
267
# complete the incomplete line at the end
268
echo >>actual &&
269
- qz_to_tab_space <<\EOF >expected &&
269
+ qz_to_tab_space <<EOF >expected &&
270
Z message two Z
271
Z message one Z
272
Z add bar Z
273
Z $(commit_msg) Z
274
EOF
275
test_cmp expected actual
276
-"
276
+'
277
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 &&
280
# complete the incomplete line at the end
281
echo >>actual &&
282
- qz_to_tab_space <<\EOF >expected &&
282
+ qz_to_tab_space <<EOF >expected &&
283
$head1 message two Z
284
$head2 message one Z
285
$head3 add bar Z
286
$head4 $(commit_msg) Z
287
EOF
288
test_cmp expected actual
289
-"
289
+'
290
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 &&
293
# complete the incomplete line at the end
294
echo >>actual &&
295
- cat <<\EOF >expected &&
295
+ cat <<EOF >expected &&
296
message two
297
message one
298
add bar
299
$(commit_msg)
300
EOF
301
test_cmp expected actual
302
-"
302
+'
303
304
-test_expect_success 'left/right alignment formatting with stealing' "
305
- git commit --amend -m short --author 'long long long <long@me.com>' &&
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 <long@me.com>" &&
306
+ git log --pretty="format:%<(10,trunc)%s%>>(10,ltrunc)% an" >actual &&
307
# complete the incomplete line at the end
308
echo >>actual &&
309
- cat <<\EOF >expected &&
309
+ cat <<EOF >expected &&
310
short long long long
311
message .. A U Thor
312
add bar A U Thor
313
$(commit_msg "" "8" "..*$") A U Thor
314
EOF
315
test_cmp expected actual
316
-"
316
+'
317
318
test_done