t7004: description on the same line as test_expect_success
There are several tests in t7004 where the test description that follows `test_expect_success` is on a separate line, violating our coding style. Adapt these to be on the same line. Signed-off-by: AbdAlRahman Gad <abdobngad@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
AbdAlRahman Gad committed
Aug 8, 2024 at 19:32 UTC
8975df91ffe3e83e95bfcaab6764b363c0f5c82b
1 file changed
+83
-166
t/t7004-tag.sh
+83
-166
@@ -154,26 +154,21 @@ test_expect_success 'listing a tag using a matching pattern should succeed' \
154
test_expect_success 'listing a tag with --ignore-case' \
155
'test $(git tag -l --ignore-case MYTAG) = mytag'
156
157
-test_expect_success \
158
- 'listing a tag using a matching pattern should output that tag' \
157
+test_expect_success 'listing a tag using a matching pattern should output that tag' \
158
'test $(git tag -l mytag) = mytag'
159
161
-test_expect_success \
162
- 'listing tags using a non-matching pattern should succeed' \
160
+test_expect_success 'listing tags using a non-matching pattern should succeed' \
161
'git tag -l xxx'
162
165
-test_expect_success \
166
- 'listing tags using a non-matching pattern should output nothing' \
163
+test_expect_success 'listing tags using a non-matching pattern should output nothing' \
164
'test $(git tag -l xxx | wc -l) -eq 0'
165
166
# special cases for creating tags:
167
171
-test_expect_success \
172
- 'trying to create a tag with the name of one existing should fail' \
168
+test_expect_success 'trying to create a tag with the name of one existing should fail' \
169
'test_must_fail git tag mytag'
170
175
-test_expect_success \
176
- 'trying to create a tag with a non-valid name should fail' '
171
+test_expect_success 'trying to create a tag with a non-valid name should fail' '
172
test $(git tag -l | wc -l) -eq 1 &&
173
test_must_fail git tag "" &&
174
test_must_fail git tag .othertag &&
@@ -207,8 +202,7 @@ test_expect_success 'trying to delete an unknown tag should fail' '
202
test_must_fail git tag -d unknown-tag
203
'
204
210
-test_expect_success \
211
- 'trying to delete tags without params should succeed and do nothing' '
205
+test_expect_success 'trying to delete tags without params should succeed and do nothing' '
206
cat >expect <<-\EOF &&
207
myhead
208
mytag
@@ -220,8 +214,7 @@ test_expect_success \
214
test_cmp expect actual
215
'
216
223
-test_expect_success \
224
- 'deleting two existing tags in one command should succeed' '
217
+test_expect_success 'deleting two existing tags in one command should succeed' '
218
tag_exists mytag &&
219
tag_exists myhead &&
220
git tag -d mytag myhead &&
@@ -229,15 +222,13 @@ test_expect_success \
222
! tag_exists myhead
223
'
224
232
-test_expect_success \
233
- 'creating a tag with the name of another deleted one should succeed' '
225
+test_expect_success 'creating a tag with the name of another deleted one should succeed' '
226
! tag_exists mytag &&
227
git tag mytag &&
228
tag_exists mytag
229
'
230
239
-test_expect_success \
240
- 'trying to delete two tags, existing and not, should fail in the 2nd' '
231
+test_expect_success 'trying to delete two tags, existing and not, should fail in the 2nd' '
232
tag_exists mytag &&
233
! tag_exists nonexistingtag &&
234
test_must_fail git tag -d mytag nonexistingtag &&
@@ -277,8 +268,7 @@ test_expect_success 'listing all tags should print them ordered' '
268
test_cmp expect actual
269
'
270
280
-test_expect_success \
281
- 'listing tags with substring as pattern must print those matching' '
271
+test_expect_success 'listing tags with substring as pattern must print those matching' '
272
cat >expect <<-\EOF &&
273
a1
274
aa1
@@ -289,8 +279,7 @@ test_expect_success \
279
test_cmp expect current
280
'
281
292
-test_expect_success \
293
- 'listing tags with a suffix as pattern must print those matching' '
282
+test_expect_success 'listing tags with a suffix as pattern must print those matching' '
283
cat >expect <<-\EOF &&
284
v0.2.1
285
v1.0.1
@@ -299,8 +288,7 @@ test_expect_success \
288
test_cmp expect actual
289
'
290
302
-test_expect_success \
303
- 'listing tags with a prefix as pattern must print those matching' '
291
+test_expect_success 'listing tags with a prefix as pattern must print those matching' '
292
cat >expect <<-\EOF &&
293
t210
294
t211
@@ -309,8 +297,7 @@ test_expect_success \
297
test_cmp expect actual
298
'
299
312
-test_expect_success \
313
- 'listing tags using a name as pattern must print that one matching' '
300
+test_expect_success 'listing tags using a name as pattern must print that one matching' '
301
cat >expect <<-\EOF &&
302
a1
303
EOF
@@ -318,8 +305,7 @@ test_expect_success \
305
test_cmp expect actual
306
'
307
321
-test_expect_success \
322
- 'listing tags using a name as pattern must print that one matching' '
308
+test_expect_success 'listing tags using a name as pattern must print that one matching' '
309
cat >expect <<-\EOF &&
310
v1.0
311
EOF
@@ -327,8 +313,7 @@ test_expect_success \
313
test_cmp expect actual
314
'
315
330
-test_expect_success \
331
- 'listing tags with ? in the pattern should print those matching' '
316
+test_expect_success 'listing tags with ? in the pattern should print those matching' '
317
cat >expect <<-\EOF &&
318
v1.0.1
319
v1.1.3
@@ -337,14 +322,12 @@ test_expect_success \
322
test_cmp expect actual
323
'
324
340
-test_expect_success \
341
- 'listing tags using v.* should print nothing because none have v.' '
325
+test_expect_success 'listing tags using v.* should print nothing because none have v.' '
326
git tag -l "v.*" >actual &&
327
test_must_be_empty actual
328
'
329
346
-test_expect_success \
347
- 'listing tags using v* should print only those having v' '
330
+test_expect_success 'listing tags using v* should print only those having v' '
331
cat >expect <<-\EOF &&
332
v0.2.1
333
v1.0
@@ -428,8 +411,7 @@ test_expect_success 'listing tags -n in column with column.ui ignored' '
411
412
# creating and verifying lightweight tags:
413
431
-test_expect_success \
432
- 'a non-annotated tag created without parameters should point to HEAD' '
414
+test_expect_success 'a non-annotated tag created without parameters should point to HEAD' '
415
git tag non-annotated-tag &&
416
test $(git cat-file -t non-annotated-tag) = commit &&
417
test $(git rev-parse non-annotated-tag) = $(git rev-parse HEAD)
@@ -438,12 +420,10 @@ test_expect_success \
420
test_expect_success 'trying to verify an unknown tag should fail' \
421
'test_must_fail git tag -v unknown-tag'
422
441
-test_expect_success \
442
- 'trying to verify a non-annotated and non-signed tag should fail' \
423
+test_expect_success 'trying to verify a non-annotated and non-signed tag should fail' \
424
'test_must_fail git tag -v non-annotated-tag'
425
445
-test_expect_success \
446
- 'trying to verify many non-annotated or unknown tags, should fail' \
426
+test_expect_success 'trying to verify many non-annotated or unknown tags, should fail' \
427
'test_must_fail git tag -v unknown-tag1 non-annotated-tag unknown-tag2'
428
429
# creating annotated tags:
@@ -463,8 +443,7 @@ tagger C O Mitter <committer@example.com> $4 -0700
443
EOF
444
}
445
466
-test_expect_success \
467
- 'creating an annotated tag with -m message should succeed' '
446
+test_expect_success 'creating an annotated tag with -m message should succeed' '
447
commit=$(git rev-parse HEAD) &&
448
time=$test_tick &&
449
get_tag_header annotated-tag $commit commit $time >expect &&
@@ -481,8 +460,7 @@ test_expect_success 'set up editor' '
460
EOF
461
'
462
484
-test_expect_success \
485
- 'creating an annotated tag with -m message --edit should succeed' '
463
+test_expect_success 'creating an annotated tag with -m message --edit should succeed' '
464
get_tag_header annotated-tag-edit $commit commit $time >expect &&
465
echo "An edited message" >>expect &&
466
GIT_EDITOR=./fakeeditor git tag -m "A message" --edit annotated-tag-edit &&
@@ -490,8 +468,7 @@ test_expect_success \
468
test_cmp expect actual
469
'
470
493
-test_expect_success \
494
- 'creating an annotated tag with -F messagefile should succeed' '
471
+test_expect_success 'creating an annotated tag with -F messagefile should succeed' '
472
cat >msgfile <<-\EOF &&
473
Another message
474
in a file.
@@ -510,8 +487,7 @@ test_expect_success 'set up editor' '
487
EOF
488
'
489
513
-test_expect_success \
514
- 'creating an annotated tag with -F messagefile --edit should succeed' '
490
+test_expect_success 'creating an annotated tag with -F messagefile --edit should succeed' '
491
get_tag_header file-annotated-tag-edit $commit commit $time >expect &&
492
sed -e "s/Another message/Another edited message/g" msgfile >>expect &&
493
GIT_EDITOR=./fakeeditor git tag -F msgfile --edit file-annotated-tag-edit &&
@@ -531,16 +507,14 @@ test_expect_success 'creating an annotated tag with -F - should succeed' '
507
test_cmp expect actual
508
'
509
534
-test_expect_success \
535
- 'trying to create a tag with a non-existing -F file should fail' '
510
+test_expect_success 'trying to create a tag with a non-existing -F file should fail' '
511
! test -f nonexistingfile &&
512
! tag_exists notag &&
513
test_must_fail git tag -F nonexistingfile notag &&
514
! tag_exists notag
515
'
516
542
-test_expect_success \
543
- 'trying to create tags giving both -m or -F options should fail' '
517
+test_expect_success 'trying to create tags giving both -m or -F options should fail' '
518
echo "message file 1" >msgfile1 &&
519
! tag_exists msgtag &&
520
test_must_fail git tag -m "message 1" -F msgfile1 msgtag &&
@@ -554,16 +528,14 @@ test_expect_success \
528
529
# blank and empty messages:
530
557
-test_expect_success \
558
- 'creating a tag with an empty -m message should succeed' '
531
+test_expect_success 'creating a tag with an empty -m message should succeed' '
532
get_tag_header empty-annotated-tag $commit commit $time >expect &&
533
git tag -m "" empty-annotated-tag &&
534
get_tag_msg empty-annotated-tag >actual &&
535
test_cmp expect actual
536
'
537
565
-test_expect_success \
566
- 'creating a tag with an empty -F messagefile should succeed' '
538
+test_expect_success 'creating a tag with an empty -F messagefile should succeed' '
539
>emptyfile &&
540
get_tag_header emptyfile-annotated-tag $commit commit $time >expect &&
541
git tag -F emptyfile emptyfile-annotated-tag &&
@@ -571,8 +543,7 @@ test_expect_success \
543
test_cmp expect actual
544
'
545
574
-test_expect_success \
575
- 'extra blanks in the message for an annotated tag should be removed' '
546
+test_expect_success 'extra blanks in the message for an annotated tag should be removed' '
547
printf "\n\n \n\t\nLeading blank lines\n" >blanksfile &&
548
printf "\n\t \t \nRepeated blank lines\n" >>blanksfile &&
549
printf "\n\n\nTrailing spaces \t \n" >>blanksfile &&
@@ -592,16 +563,14 @@ test_expect_success \
563
test_cmp expect actual
564
'
565
595
-test_expect_success \
596
- 'creating a tag with blank -m message with spaces should succeed' '
566
+test_expect_success 'creating a tag with blank -m message with spaces should succeed' '
567
get_tag_header blank-annotated-tag $commit commit $time >expect &&
568
git tag -m " " blank-annotated-tag &&
569
get_tag_msg blank-annotated-tag >actual &&
570
test_cmp expect actual
571
'
572
603
-test_expect_success \
604
- 'creating a tag with blank -F messagefile with spaces should succeed' '
573
+test_expect_success 'creating a tag with blank -F messagefile with spaces should succeed' '
574
echo " " >blankfile &&
575
echo "" >>blankfile &&
576
echo " " >>blankfile &&
@@ -611,8 +580,7 @@ test_expect_success \
580
test_cmp expect actual
581
'
582
614
-test_expect_success \
615
- 'creating a tag with -F file of spaces and no newline should succeed' '
583
+test_expect_success 'creating a tag with -F file of spaces and no newline should succeed' '
584
printf " " >blanknonlfile &&
585
get_tag_header blanknonlfile-annotated-tag $commit commit $time >expect &&
586
git tag -F blanknonlfile blanknonlfile-annotated-tag &&
@@ -622,8 +590,7 @@ test_expect_success \
590
591
# messages with commented lines:
592
625
-test_expect_success \
626
- 'creating a tag using a -F messagefile with #comments should succeed' '
593
+test_expect_success 'creating a tag using a -F messagefile with #comments should succeed' '
594
cat >commentsfile <<-\EOF &&
595
# A comment
596
@@ -655,16 +622,14 @@ test_expect_success \
622
test_cmp expect actual
623
'
624
658
-test_expect_success \
659
- 'creating a tag with a #comment in the -m message should succeed' '
625
+test_expect_success 'creating a tag with a #comment in the -m message should succeed' '
626
get_tag_header comment-annotated-tag $commit commit $time >expect &&
627
git tag -m "#comment" comment-annotated-tag &&
628
get_tag_msg comment-annotated-tag >actual &&
629
test_cmp expect actual
630
'
631
666
-test_expect_success \
667
- 'creating a tag with #comments in the -F messagefile should succeed' '
632
+test_expect_success 'creating a tag with #comments in the -F messagefile should succeed' '
633
echo "#comment" >commentfile &&
634
echo "" >>commentfile &&
635
echo "####" >>commentfile &&
@@ -674,8 +639,7 @@ test_expect_success \
639
test_cmp expect actual
640
'
641
677
-test_expect_success \
678
- 'creating a tag with a file of #comment and no newline should succeed' '
642
+test_expect_success 'creating a tag with a file of #comment and no newline should succeed' '
643
printf "#comment" >commentnonlfile &&
644
get_tag_header commentnonlfile-annotated-tag $commit commit $time >expect &&
645
git tag -F commentnonlfile commentnonlfile-annotated-tag &&
@@ -794,8 +758,7 @@ test_expect_success 'bad editor causes panic when only --trailer is given' '
758
759
# listing messages for annotated non-signed tags:
760
797
-test_expect_success \
798
- 'listing the one-line message of a non-signed tag should succeed' '
761
+test_expect_success 'listing the one-line message of a non-signed tag should succeed' '
762
git tag -m "A msg" tag-one-line &&
763
764
echo "tag-one-line" >expect &&
@@ -834,8 +797,7 @@ test_expect_success 'The -n 100 invocation means -n --list 100, not -n100' '
797
test_cmp expect actual
798
'
799
837
-test_expect_success \
838
- 'listing the zero-lines message of a non-signed tag should succeed' '
800
+test_expect_success 'listing the zero-lines message of a non-signed tag should succeed' '
801
git tag -m "" tag-zero-lines &&
802
803
echo "tag-zero-lines" >expect &&
@@ -859,8 +821,7 @@ test_expect_success \
821
test_cmp expect actual
822
'
823
862
-test_expect_success \
863
- 'listing many message lines of a non-signed tag should succeed' '
824
+test_expect_success 'listing many message lines of a non-signed tag should succeed' '
825
echo "tag line one" >annotagmsg &&
826
echo "tag line two" >>annotagmsg &&
827
echo "tag line three" >>annotagmsg &&
@@ -951,20 +912,17 @@ test_expect_success 'git tag --format with ahead-behind' '
912
913
# trying to verify annotated non-signed tags:
914
954
-test_expect_success GPG \
955
- 'trying to verify an annotated non-signed tag should fail' '
915
+test_expect_success GPG 'trying to verify an annotated non-signed tag should fail' '
916
tag_exists annotated-tag &&
917
test_must_fail git tag -v annotated-tag
918
'
919
960
-test_expect_success GPG \
961
- 'trying to verify a file-annotated non-signed tag should fail' '
920
+test_expect_success GPG 'trying to verify a file-annotated non-signed tag should fail' '
921
tag_exists file-annotated-tag &&
922
test_must_fail git tag -v file-annotated-tag
923
'
924
966
-test_expect_success GPG \
967
- 'trying to verify two annotated non-signed tags should fail' '
925
+test_expect_success GPG 'trying to verify two annotated non-signed tags should fail' '
926
tag_exists annotated-tag file-annotated-tag &&
927
test_must_fail git tag -v annotated-tag file-annotated-tag
928
'
@@ -1021,8 +979,7 @@ test_expect_success GPG '-u implies signed tag' '
979
test_cmp expect actual
980
'
981
1024
-test_expect_success GPG \
1025
- 'creating a signed tag with -F messagefile should succeed' '
982
+test_expect_success GPG 'creating a signed tag with -F messagefile should succeed' '
983
cat >sigmsgfile <<-\EOF &&
984
Another signed tag
985
message in a file.
@@ -1057,8 +1014,7 @@ test_expect_success GPG '-s implies annotated tag' '
1014
test_cmp expect actual
1015
'
1016
1060
-test_expect_success GPG \
1061
- 'git tag -s implied if configured with tag.forcesignannotated' \
1017
+test_expect_success GPG 'git tag -s implied if configured with tag.forcesignannotated' \
1018
'get_tag_header forcesignannotated-implied-sign $commit commit $time >expect &&
1019
echo "A message" >>expect &&
1020
echo "-----BEGIN PGP SIGNATURE-----" >>expect &&
@@ -1068,16 +1024,14 @@ test_expect_success GPG \
1024
test_cmp expect actual
1025
'
1026
1071
-test_expect_success GPG \
1072
- 'lightweight with no message when configured with tag.forcesignannotated' \
1027
+test_expect_success GPG 'lightweight with no message when configured with tag.forcesignannotated' \
1028
'test_config tag.forcesignannotated true &&
1029
git tag forcesignannotated-lightweight &&
1030
tag_exists forcesignannotated-lightweight &&
1031
test_must_fail git tag -v forcesignannotated-no-message
1032
'
1033
1079
-test_expect_success GPG \
1080
- 'git tag -a disable configured tag.forcesignannotated' \
1034
+test_expect_success GPG 'git tag -a disable configured tag.forcesignannotated' \
1035
'get_tag_header forcesignannotated-annotate $commit commit $time >expect &&
1036
echo "A message" >>expect &&
1037
test_config tag.forcesignannotated true &&
@@ -1087,8 +1041,7 @@ test_expect_success GPG \
1041
test_must_fail git tag -v forcesignannotated-annotate
1042
'
1043
1090
-test_expect_success GPG \
1091
- 'git tag --sign enable GPG sign' \
1044
+test_expect_success GPG 'git tag --sign enable GPG sign' \
1045
'get_tag_header forcesignannotated-disabled $commit commit $time >expect &&
1046
echo "A message" >>expect &&
1047
echo "-----BEGIN PGP SIGNATURE-----" >>expect &&
@@ -1098,8 +1051,7 @@ test_expect_success GPG \
1051
test_cmp expect actual
1052
'
1053
1101
-test_expect_success GPG \
1102
- 'git tag configured tag.gpgsign enables GPG sign' \
1054
+test_expect_success GPG 'git tag configured tag.gpgsign enables GPG sign' \
1055
'get_tag_header gpgsign-enabled $commit commit $time >expect &&
1056
echo "A message" >>expect &&
1057
echo "-----BEGIN PGP SIGNATURE-----" >>expect &&
@@ -1109,8 +1061,7 @@ test_expect_success GPG \
1061
test_cmp expect actual
1062
'
1063
1112
-test_expect_success GPG \
1113
- 'git tag --no-sign configured tag.gpgsign skip GPG sign' \
1064
+test_expect_success GPG 'git tag --no-sign configured tag.gpgsign skip GPG sign' \
1065
'get_tag_header no-sign $commit commit $time >expect &&
1066
echo "A message" >>expect &&
1067
test_config tag.gpgsign true &&
@@ -1119,8 +1070,7 @@ test_expect_success GPG \
1070
test_cmp expect actual
1071
'
1072
1122
-test_expect_success GPG \
1123
- 'trying to create a signed tag with non-existing -F file should fail' '
1073
+test_expect_success GPG 'trying to create a signed tag with non-existing -F file should fail' '
1074
! test -f nonexistingfile &&
1075
! tag_exists nosigtag &&
1076
test_must_fail git tag -s -F nonexistingfile nosigtag &&
@@ -1133,8 +1083,7 @@ test_expect_success GPG 'verifying a signed tag should succeed' \
1083
test_expect_success GPG 'verifying two signed tags in one command should succeed' \
1084
'git tag -v signed-tag file-signed-tag'
1085
1136
-test_expect_success GPG \
1137
- 'verifying many signed and non-signed tags should fail' '
1086
+test_expect_success GPG 'verifying many signed and non-signed tags should fail' '
1087
test_must_fail git tag -v signed-tag annotated-tag &&
1088
test_must_fail git tag -v file-annotated-tag file-signed-tag &&
1089
test_must_fail git tag -v annotated-tag \
@@ -1165,8 +1114,7 @@ test_expect_success GPG 'verifying a forged tag with --format should fail silent
1114
1115
# blank and empty messages for signed tags:
1116
1168
-test_expect_success GPG \
1169
- 'creating a signed tag with an empty -m message should succeed' '
1117
+test_expect_success GPG 'creating a signed tag with an empty -m message should succeed' '
1118
get_tag_header empty-signed-tag $commit commit $time >expect &&
1119
echo "-----BEGIN PGP SIGNATURE-----" >>expect &&
1120
git tag -s -m "" empty-signed-tag &&
@@ -1175,8 +1123,7 @@ test_expect_success GPG \
1123
git tag -v empty-signed-tag
1124
'
1125
1178
-test_expect_success GPG \
1179
- 'creating a signed tag with an empty -F messagefile should succeed' '
1126
+test_expect_success GPG 'creating a signed tag with an empty -F messagefile should succeed' '
1127
>sigemptyfile &&
1128
get_tag_header emptyfile-signed-tag $commit commit $time >expect &&
1129
echo "-----BEGIN PGP SIGNATURE-----" >>expect &&
@@ -1186,8 +1133,7 @@ test_expect_success GPG \
1133
git tag -v emptyfile-signed-tag
1134
'
1135
1189
-test_expect_success GPG \
1190
- 'extra blanks in the message for a signed tag should be removed' '
1136
+test_expect_success GPG 'extra blanks in the message for a signed tag should be removed' '
1137
printf "\n\n \n\t\nLeading blank lines\n" >sigblanksfile &&
1138
printf "\n\t \t \nRepeated blank lines\n" >>sigblanksfile &&
1139
printf "\n\n\nTrailing spaces \t \n" >>sigblanksfile &&
@@ -1209,8 +1155,7 @@ test_expect_success GPG \
1155
git tag -v blanks-signed-tag
1156
'
1157
1212
-test_expect_success GPG \
1213
- 'creating a signed tag with a blank -m message should succeed' '
1158
+test_expect_success GPG 'creating a signed tag with a blank -m message should succeed' '
1159
get_tag_header blank-signed-tag $commit commit $time >expect &&
1160
echo "-----BEGIN PGP SIGNATURE-----" >>expect &&
1161
git tag -s -m " " blank-signed-tag &&
@@ -1219,8 +1164,7 @@ test_expect_success GPG \
1164
git tag -v blank-signed-tag
1165
'
1166
1222
-test_expect_success GPG \
1223
- 'creating a signed tag with blank -F file with spaces should succeed' '
1167
+test_expect_success GPG 'creating a signed tag with blank -F file with spaces should succeed' '
1168
echo " " >sigblankfile &&
1169
echo "" >>sigblankfile &&
1170
echo " " >>sigblankfile &&
@@ -1232,8 +1176,7 @@ test_expect_success GPG \
1176
git tag -v blankfile-signed-tag
1177
'
1178
1235
-test_expect_success GPG \
1236
- 'creating a signed tag with spaces and no newline should succeed' '
1179
+test_expect_success GPG 'creating a signed tag with spaces and no newline should succeed' '
1180
printf " " >sigblanknonlfile &&
1181
get_tag_header blanknonlfile-signed-tag $commit commit $time >expect &&
1182
echo "-----BEGIN PGP SIGNATURE-----" >>expect &&
@@ -1256,8 +1199,7 @@ test_expect_success GPG 'signed tag with embedded PGP message' '
1199
1200
# messages with commented lines for signed tags:
1201
1259
-test_expect_success GPG \
1260
- 'creating a signed tag with a -F file with #comments should succeed' '
1202
+test_expect_success GPG 'creating a signed tag with a -F file with #comments should succeed' '
1203
cat >sigcommentsfile <<-\EOF &&
1204
# A comment
1205
@@ -1291,8 +1233,7 @@ test_expect_success GPG \
1233
git tag -v comments-signed-tag
1234
'
1235
1294
-test_expect_success GPG \
1295
- 'creating a signed tag with #commented -m message should succeed' '
1236
+test_expect_success GPG 'creating a signed tag with #commented -m message should succeed' '
1237
get_tag_header comment-signed-tag $commit commit $time >expect &&
1238
echo "-----BEGIN PGP SIGNATURE-----" >>expect &&
1239
git tag -s -m "#comment" comment-signed-tag &&
@@ -1301,8 +1242,7 @@ test_expect_success GPG \
1242
git tag -v comment-signed-tag
1243
'
1244
1304
-test_expect_success GPG \
1305
- 'creating a signed tag with #commented -F messagefile should succeed' '
1245
+test_expect_success GPG 'creating a signed tag with #commented -F messagefile should succeed' '
1246
echo "#comment" >sigcommentfile &&
1247
echo "" >>sigcommentfile &&
1248
echo "####" >>sigcommentfile &&
@@ -1314,8 +1254,7 @@ test_expect_success GPG \
1254
git tag -v commentfile-signed-tag
1255
'
1256
1317
-test_expect_success GPG \
1318
- 'creating a signed tag with a #comment and no newline should succeed' '
1257
+test_expect_success GPG 'creating a signed tag with a #comment and no newline should succeed' '
1258
printf "#comment" >sigcommentnonlfile &&
1259
get_tag_header commentnonlfile-signed-tag $commit commit $time >expect &&
1260
echo "-----BEGIN PGP SIGNATURE-----" >>expect &&
@@ -1327,8 +1266,7 @@ test_expect_success GPG \
1266
1267
# listing messages for signed tags:
1268
1330
-test_expect_success GPG \
1331
- 'listing the one-line message of a signed tag should succeed' '
1269
+test_expect_success GPG 'listing the one-line message of a signed tag should succeed' '
1270
git tag -s -m "A message line signed" stag-one-line &&
1271
1272
echo "stag-one-line" >expect &&
@@ -1352,8 +1290,7 @@ test_expect_success GPG \
1290
test_cmp expect actual
1291
'
1292
1355
-test_expect_success GPG \
1356
- 'listing the zero-lines message of a signed tag should succeed' '
1293
+test_expect_success GPG 'listing the zero-lines message of a signed tag should succeed' '
1294
git tag -s -m "" stag-zero-lines &&
1295
1296
echo "stag-zero-lines" >expect &&
@@ -1377,8 +1314,7 @@ test_expect_success GPG \
1314
test_cmp expect actual
1315
'
1316
1380
-test_expect_success GPG \
1381
- 'listing many message lines of a signed tag should succeed' '
1317
+test_expect_success GPG 'listing many message lines of a signed tag should succeed' '
1318
echo "stag line one" >sigtagmsg &&
1319
echo "stag line two" >>sigtagmsg &&
1320
echo "stag line three" >>sigtagmsg &&
@@ -1423,8 +1359,7 @@ test_expect_success GPG \
1359
1360
# tags pointing to objects different from commits:
1361
1426
-test_expect_success GPG \
1427
- 'creating a signed tag pointing to a tree should succeed' '
1362
+test_expect_success GPG 'creating a signed tag pointing to a tree should succeed' '
1363
tree=$(git rev-parse HEAD^{tree}) &&
1364
get_tag_header tree-signed-tag $tree tree $time >expect &&
1365
echo "A message for a tree" >>expect &&
@@ -1434,8 +1369,7 @@ test_expect_success GPG \
1369
test_cmp expect actual
1370
'
1371
1437
-test_expect_success GPG \
1438
- 'creating a signed tag pointing to a blob should succeed' '
1372
+test_expect_success GPG 'creating a signed tag pointing to a blob should succeed' '
1373
blob=$(git rev-parse HEAD:foo) &&
1374
get_tag_header blob-signed-tag $blob blob $time >expect &&
1375
echo "A message for a blob" >>expect &&
@@ -1445,8 +1379,7 @@ test_expect_success GPG \
1379
test_cmp expect actual
1380
'
1381
1448
-test_expect_success GPG \
1449
- 'creating a signed tag pointing to another tag should succeed' '
1382
+test_expect_success GPG 'creating a signed tag pointing to another tag should succeed' '
1383
tag=$(git rev-parse signed-tag 2>/dev/null) &&
1384
get_tag_header tag-signed-tag $tag tag $time >expect &&
1385
echo "A message for another tag" >>expect &&
@@ -1458,8 +1391,7 @@ test_expect_success GPG \
1391
1392
# usage with rfc1991 signatures
1393
1461
-test_expect_success GPG,RFC1991 \
1462
- 'creating a signed tag with rfc1991' '
1394
+test_expect_success GPG,RFC1991 'creating a signed tag with rfc1991' '
1395
get_tag_header rfc1991-signed-tag $commit commit $time >expect &&
1396
echo "RFC1991 signed tag" >>expect &&
1397
echo "-----BEGIN PGP MESSAGE-----" >>expect &&
@@ -1469,8 +1401,7 @@ test_expect_success GPG,RFC1991 \
1401
test_cmp expect actual
1402
'
1403
1472
-test_expect_success GPG,RFC1991 \
1473
- 'reediting a signed tag body omits signature' '
1404
+test_expect_success GPG,RFC1991 'reediting a signed tag body omits signature' '
1405
cat >fakeeditor <<-\EOF &&
1406
#!/bin/sh
1407
cp "$1" actual
@@ -1482,14 +1413,12 @@ test_expect_success GPG,RFC1991 \
1413
test_cmp expect actual
1414
'
1415
1485
-test_expect_success GPG,RFC1991 \
1486
- 'verifying rfc1991 signature' '
1416
+test_expect_success GPG,RFC1991 'verifying rfc1991 signature' '
1417
echo "rfc1991" >gpghome/gpg.conf &&
1418
git tag -v rfc1991-signed-tag
1419
'
1420
1491
-test_expect_success GPG,RFC1991 \
1492
- 'list tag with rfc1991 signature' '
1421
+test_expect_success GPG,RFC1991 'list tag with rfc1991 signature' '
1422
echo "rfc1991" >gpghome/gpg.conf &&
1423
echo "rfc1991-signed-tag RFC1991 signed tag" >expect &&
1424
git tag -l -n1 rfc1991-signed-tag >actual &&
@@ -1500,14 +1429,12 @@ test_expect_success GPG,RFC1991 \
1429
test_cmp expect actual
1430
'
1431
1503
-test_expect_success GPG,RFC1991 \
1504
- 'verifying rfc1991 signature without --rfc1991' '
1432
+test_expect_success GPG,RFC1991 'verifying rfc1991 signature without --rfc1991' '
1433
rm -f gpghome/gpg.conf &&
1434
git tag -v rfc1991-signed-tag
1435
'
1436
1509
-test_expect_success GPG,RFC1991 \
1510
- 'list tag with rfc1991 signature without --rfc1991' '
1437
+test_expect_success GPG,RFC1991 'list tag with rfc1991 signature without --rfc1991' '
1438
echo "rfc1991-signed-tag RFC1991 signed tag" >expect &&
1439
git tag -l -n1 rfc1991-signed-tag >actual &&
1440
test_cmp expect actual &&
@@ -1517,22 +1444,19 @@ test_expect_success GPG,RFC1991 \
1444
test_cmp expect actual
1445
'
1446
1520
-test_expect_success GPG,RFC1991 \
1521
- 'reediting a signed tag body omits signature' '
1447
+test_expect_success GPG,RFC1991 'reediting a signed tag body omits signature' '
1448
echo "RFC1991 signed tag" >expect &&
1449
GIT_EDITOR=./fakeeditor git tag -f -s rfc1991-signed-tag $commit &&
1450
test_cmp expect actual
1451
'
1452
1453
# try to sign with bad user.signingkey
1528
-test_expect_success GPG \
1529
- 'git tag -s fails if gpg is misconfigured (bad key)' \
1454
+test_expect_success GPG 'git tag -s fails if gpg is misconfigured (bad key)' \
1455
'test_config user.signingkey BobTheMouse &&
1456
test_must_fail git tag -s -m tail tag-gpg-failure'
1457
1458
# try to produce invalid signature
1534
-test_expect_success GPG \
1535
- 'git tag -s fails if gpg is misconfigured (bad signature format)' \
1459
+test_expect_success GPG 'git tag -s fails if gpg is misconfigured (bad signature format)' \
1460
'test_config gpg.program echo &&
1461
test_must_fail git tag -s -m tail tag-gpg-failure'
1462
@@ -1555,34 +1479,29 @@ test_expect_success GPG 'git verifies tag is valid with double signature' '
1479
'
1480
1481
# try to sign with bad user.signingkey
1558
-test_expect_success GPGSM \
1559
- 'git tag -s fails if gpgsm is misconfigured (bad key)' \
1482
+test_expect_success GPGSM 'git tag -s fails if gpgsm is misconfigured (bad key)' \
1483
'test_config user.signingkey BobTheMouse &&
1484
test_config gpg.format x509 &&
1485
test_must_fail git tag -s -m tail tag-gpg-failure'
1486
1487
# try to produce invalid signature
1565
-test_expect_success GPGSM \
1566
- 'git tag -s fails if gpgsm is misconfigured (bad signature format)' \
1488
+test_expect_success GPGSM 'git tag -s fails if gpgsm is misconfigured (bad signature format)' \
1489
'test_config gpg.x509.program echo &&
1490
test_config gpg.format x509 &&
1491
test_must_fail git tag -s -m tail tag-gpg-failure'
1492
1493
# try to verify without gpg:
1494
1573
-test_expect_success GPG \
1574
- 'verify signed tag fails when public key is not present' \
1495
+test_expect_success GPG 'verify signed tag fails when public key is not present' \
1496
'rm -rf gpghome &&
1497
test_must_fail git tag -v signed-tag
1498
'
1499
1579
-test_expect_success \
1580
- 'git tag -a fails if tag annotation is empty' '
1500
+test_expect_success 'git tag -a fails if tag annotation is empty' '
1501
! (GIT_EDITOR=cat git tag -a initial-comment)
1502
'
1503
1584
-test_expect_success \
1585
- 'message in editor has initial comment' '
1504
+test_expect_success 'message in editor has initial comment' '
1505
! (GIT_EDITOR=cat git tag -a initial-comment >actual)
1506
'
1507
@@ -1593,15 +1512,13 @@ test_expect_success 'message in editor has initial comment: first line' '
1512
test_cmp first.expect first.actual
1513
'
1514
1596
-test_expect_success \
1597
- 'message in editor has initial comment: remainder' '
1515
+test_expect_success 'message in editor has initial comment: remainder' '
1516
# remove commented lines from the remainder -- should be empty
1517
sed -e 1d -e "/^#/d" <actual >rest.actual &&
1518
test_must_be_empty rest.actual
1519
'
1520
1603
-test_expect_success \
1604
- 'overwriting an annotated tag should use its previous body' '
1521
+test_expect_success 'overwriting an annotated tag should use its previous body' '
1522
get_tag_header reuse $commit commit $time >expect &&
1523
echo "An annotation to be reused" >>expect &&
1524
git tag -a -m "An annotation to be reused" reuse &&