Skip to content

Commit b562a54

Browse files
Denton-Lgitster
authored andcommitted
t4014: s/expected/expect/
For test cases, the usual convention is to name expected output files "expect", not "expected". Replace all instances of "expected" with "expect", except for one case where the "expected" is used as the name of a test case. Signed-off-by: Denton Liu <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fe49814 commit b562a54

File tree

1 file changed

+53
-53
lines changed

1 file changed

+53
-53
lines changed

t/t4014-format-patch.sh

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,32 +1209,32 @@ append_signoff()
12091209

12101210
test_expect_success 'signoff: commit with no body' '
12111211
append_signoff </dev/null >actual &&
1212-
cat <<\EOF | sed "s/EOL$//" >expected &&
1212+
cat <<\EOF | sed "s/EOL$//" >expect &&
12131213
4:Subject: [PATCH] EOL
12141214
8:
12151215
9:Signed-off-by: C O Mitter <[email protected]>
12161216
EOF
1217-
test_cmp expected actual
1217+
test_cmp expect actual
12181218
'
12191219

12201220
test_expect_success 'signoff: commit with only subject' '
12211221
echo subject | append_signoff >actual &&
1222-
cat >expected <<\EOF &&
1222+
cat >expect <<\EOF &&
12231223
4:Subject: [PATCH] subject
12241224
8:
12251225
9:Signed-off-by: C O Mitter <[email protected]>
12261226
EOF
1227-
test_cmp expected actual
1227+
test_cmp expect actual
12281228
'
12291229

12301230
test_expect_success 'signoff: commit with only subject that does not end with NL' '
12311231
printf subject | append_signoff >actual &&
1232-
cat >expected <<\EOF &&
1232+
cat >expect <<\EOF &&
12331233
4:Subject: [PATCH] subject
12341234
8:
12351235
9:Signed-off-by: C O Mitter <[email protected]>
12361236
EOF
1237-
test_cmp expected actual
1237+
test_cmp expect actual
12381238
'
12391239

12401240
test_expect_success 'signoff: no existing signoffs' '
@@ -1243,24 +1243,24 @@ subject
12431243
12441244
body
12451245
EOF
1246-
cat >expected <<\EOF &&
1246+
cat >expect <<\EOF &&
12471247
4:Subject: [PATCH] subject
12481248
8:
12491249
10:
12501250
11:Signed-off-by: C O Mitter <[email protected]>
12511251
EOF
1252-
test_cmp expected actual
1252+
test_cmp expect actual
12531253
'
12541254

12551255
test_expect_success 'signoff: no existing signoffs and no trailing NL' '
12561256
printf "subject\n\nbody" | append_signoff >actual &&
1257-
cat >expected <<\EOF &&
1257+
cat >expect <<\EOF &&
12581258
4:Subject: [PATCH] subject
12591259
8:
12601260
10:
12611261
11:Signed-off-by: C O Mitter <[email protected]>
12621262
EOF
1263-
test_cmp expected actual
1263+
test_cmp expect actual
12641264
'
12651265

12661266
test_expect_success 'signoff: some random signoff' '
@@ -1271,14 +1271,14 @@ body
12711271
12721272
Signed-off-by: my@house
12731273
EOF
1274-
cat >expected <<\EOF &&
1274+
cat >expect <<\EOF &&
12751275
4:Subject: [PATCH] subject
12761276
8:
12771277
10:
12781278
11:Signed-off-by: my@house
12791279
12:Signed-off-by: C O Mitter <[email protected]>
12801280
EOF
1281-
test_cmp expected actual
1281+
test_cmp expect actual
12821282
'
12831283

12841284
test_expect_success 'signoff: misc conforming footer elements' '
@@ -1292,14 +1292,14 @@ Signed-off-by: my@house
12921292
Tested-by: Some One <[email protected]>
12931293
Bug: 1234
12941294
EOF
1295-
cat >expected <<\EOF &&
1295+
cat >expect <<\EOF &&
12961296
4:Subject: [PATCH] subject
12971297
8:
12981298
10:
12991299
11:Signed-off-by: my@house
13001300
15:Signed-off-by: C O Mitter <[email protected]>
13011301
EOF
1302-
test_cmp expected actual
1302+
test_cmp expect actual
13031303
'
13041304

13051305
test_expect_success 'signoff: some random signoff-alike' '
@@ -1309,13 +1309,13 @@ subject
13091309
body
13101310
Fooled-by-me: my@house
13111311
EOF
1312-
cat >expected <<\EOF &&
1312+
cat >expect <<\EOF &&
13131313
4:Subject: [PATCH] subject
13141314
8:
13151315
11:
13161316
12:Signed-off-by: C O Mitter <[email protected]>
13171317
EOF
1318-
test_cmp expected actual
1318+
test_cmp expect actual
13191319
'
13201320

13211321
test_expect_success 'signoff: not really a signoff' '
@@ -1324,14 +1324,14 @@ subject
13241324
13251325
I want to mention about Signed-off-by: here.
13261326
EOF
1327-
cat >expected <<\EOF &&
1327+
cat >expect <<\EOF &&
13281328
4:Subject: [PATCH] subject
13291329
8:
13301330
9:I want to mention about Signed-off-by: here.
13311331
10:
13321332
11:Signed-off-by: C O Mitter <[email protected]>
13331333
EOF
1334-
test_cmp expected actual
1334+
test_cmp expect actual
13351335
'
13361336

13371337
test_expect_success 'signoff: not really a signoff (2)' '
@@ -1341,13 +1341,13 @@ subject
13411341
My unfortunate
13421342
Signed-off-by: example happens to be wrapped here.
13431343
EOF
1344-
cat >expected <<\EOF &&
1344+
cat >expect <<\EOF &&
13451345
4:Subject: [PATCH] subject
13461346
8:
13471347
10:Signed-off-by: example happens to be wrapped here.
13481348
11:Signed-off-by: C O Mitter <[email protected]>
13491349
EOF
1350-
test_cmp expected actual
1350+
test_cmp expect actual
13511351
'
13521352

13531353
test_expect_success 'signoff: valid S-o-b paragraph in the middle' '
@@ -1359,7 +1359,7 @@ Signed-off-by: your@house
13591359
13601360
A lot of houses.
13611361
EOF
1362-
cat >expected <<\EOF &&
1362+
cat >expect <<\EOF &&
13631363
4:Subject: [PATCH] subject
13641364
8:
13651365
9:Signed-off-by: my@house
@@ -1368,7 +1368,7 @@ EOF
13681368
13:
13691369
14:Signed-off-by: C O Mitter <[email protected]>
13701370
EOF
1371-
test_cmp expected actual
1371+
test_cmp expect actual
13721372
'
13731373

13741374
test_expect_success 'signoff: the same signoff at the end' '
@@ -1379,24 +1379,24 @@ body
13791379
13801380
Signed-off-by: C O Mitter <[email protected]>
13811381
EOF
1382-
cat >expected <<\EOF &&
1382+
cat >expect <<\EOF &&
13831383
4:Subject: [PATCH] subject
13841384
8:
13851385
10:
13861386
11:Signed-off-by: C O Mitter <[email protected]>
13871387
EOF
1388-
test_cmp expected actual
1388+
test_cmp expect actual
13891389
'
13901390

13911391
test_expect_success 'signoff: the same signoff at the end, no trailing NL' '
13921392
printf "subject\n\nSigned-off-by: C O Mitter <[email protected]>" |
13931393
append_signoff >actual &&
1394-
cat >expected <<\EOF &&
1394+
cat >expect <<\EOF &&
13951395
4:Subject: [PATCH] subject
13961396
8:
13971397
9:Signed-off-by: C O Mitter <[email protected]>
13981398
EOF
1399-
test_cmp expected actual
1399+
test_cmp expect actual
14001400
'
14011401

14021402
test_expect_success 'signoff: the same signoff NOT at the end' '
@@ -1408,14 +1408,14 @@ body
14081408
Signed-off-by: C O Mitter <[email protected]>
14091409
Signed-off-by: my@house
14101410
EOF
1411-
cat >expected <<\EOF &&
1411+
cat >expect <<\EOF &&
14121412
4:Subject: [PATCH] subject
14131413
8:
14141414
10:
14151415
11:Signed-off-by: C O Mitter <[email protected]>
14161416
12:Signed-off-by: my@house
14171417
EOF
1418-
test_cmp expected actual
1418+
test_cmp expect actual
14191419
'
14201420

14211421
test_expect_success 'signoff: tolerate garbage in conforming footer' '
@@ -1428,13 +1428,13 @@ Tested-by: my@house
14281428
Some Trash
14291429
Signed-off-by: C O Mitter <[email protected]>
14301430
EOF
1431-
cat >expected <<\EOF &&
1431+
cat >expect <<\EOF &&
14321432
4:Subject: [PATCH] subject
14331433
8:
14341434
10:
14351435
13:Signed-off-by: C O Mitter <[email protected]>
14361436
EOF
1437-
test_cmp expected actual
1437+
test_cmp expect actual
14381438
'
14391439

14401440
test_expect_success 'signoff: respect trailer config' '
@@ -1444,13 +1444,13 @@ subject
14441444
Myfooter: x
14451445
Some Trash
14461446
EOF
1447-
cat >expected <<\EOF &&
1447+
cat >expect <<\EOF &&
14481448
4:Subject: [PATCH] subject
14491449
8:
14501450
11:
14511451
12:Signed-off-by: C O Mitter <[email protected]>
14521452
EOF
1453-
test_cmp expected actual &&
1453+
test_cmp expect actual &&
14541454
14551455
test_config trailer.Myfooter.ifexists add &&
14561456
append_signoff <<\EOF >actual &&
@@ -1459,12 +1459,12 @@ subject
14591459
Myfooter: x
14601460
Some Trash
14611461
EOF
1462-
cat >expected <<\EOF &&
1462+
cat >expect <<\EOF &&
14631463
4:Subject: [PATCH] subject
14641464
8:
14651465
11:Signed-off-by: C O Mitter <[email protected]>
14661466
EOF
1467-
test_cmp expected actual
1467+
test_cmp expect actual
14681468
'
14691469

14701470
test_expect_success 'signoff: footer begins with non-signoff without @ sign' '
@@ -1479,13 +1479,13 @@ Change-id: Ideadbeef
14791479
Signed-off-by: C O Mitter <[email protected]>
14801480
Bug: 1234
14811481
EOF
1482-
cat >expected <<\EOF &&
1482+
cat >expect <<\EOF &&
14831483
4:Subject: [PATCH] subject
14841484
8:
14851485
10:
14861486
14:Signed-off-by: C O Mitter <[email protected]>
14871487
EOF
1488-
test_cmp expected actual
1488+
test_cmp expect actual
14891489
'
14901490

14911491
test_expect_success 'format patch ignores color.ui' '
@@ -1604,13 +1604,13 @@ test_expect_success 'format-patch --base' '
16041604
git checkout patchid &&
16051605
git format-patch --stdout --base=HEAD~3 -1 | tail -n 7 >actual1 &&
16061606
git format-patch --stdout --base=HEAD~3 HEAD~.. | tail -n 7 >actual2 &&
1607-
echo >expected &&
1608-
echo "base-commit: $(git rev-parse HEAD~3)" >>expected &&
1609-
echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --stable | awk "{print \$1}")" >>expected &&
1610-
echo "prerequisite-patch-id: $(git show --patch HEAD~1 | git patch-id --stable | awk "{print \$1}")" >>expected &&
1611-
signature >> expected &&
1612-
test_cmp expected actual1 &&
1613-
test_cmp expected actual2 &&
1607+
echo >expect &&
1608+
echo "base-commit: $(git rev-parse HEAD~3)" >>expect &&
1609+
echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --stable | awk "{print \$1}")" >>expect &&
1610+
echo "prerequisite-patch-id: $(git show --patch HEAD~1 | git patch-id --stable | awk "{print \$1}")" >>expect &&
1611+
signature >> expect &&
1612+
test_cmp expect actual1 &&
1613+
test_cmp expect actual2 &&
16141614
echo >fail &&
16151615
echo "base-commit: $(git rev-parse HEAD~3)" >>fail &&
16161616
echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --unstable | awk "{print \$1}")" >>fail &&
@@ -1625,8 +1625,8 @@ test_expect_success 'format-patch --base errors out when base commit is in revis
16251625
test_must_fail git format-patch --base=HEAD~1 -2 &&
16261626
git format-patch --stdout --base=HEAD~2 -2 >patch &&
16271627
grep "^base-commit:" patch >actual &&
1628-
echo "base-commit: $(git rev-parse HEAD~2)" >expected &&
1629-
test_cmp expected actual
1628+
echo "base-commit: $(git rev-parse HEAD~2)" >expect &&
1629+
test_cmp expect actual
16301630
'
16311631

16321632
test_expect_success 'format-patch --base errors out when base commit is not ancestor of revision list' '
@@ -1652,8 +1652,8 @@ test_expect_success 'format-patch --base errors out when base commit is not ance
16521652
test_must_fail git format-patch --base=$(cat commit-id-Z) -3 &&
16531653
git format-patch --stdout --base=$(cat commit-id-base) -3 >patch &&
16541654
grep "^base-commit:" patch >actual &&
1655-
echo "base-commit: $(cat commit-id-base)" >expected &&
1656-
test_cmp expected actual
1655+
echo "base-commit: $(cat commit-id-base)" >expect &&
1656+
test_cmp expect actual
16571657
'
16581658

16591659
test_expect_success 'format-patch --base=auto' '
@@ -1664,8 +1664,8 @@ test_expect_success 'format-patch --base=auto' '
16641664
test_commit N2 &&
16651665
git format-patch --stdout --base=auto -2 >patch &&
16661666
grep "^base-commit:" patch >actual &&
1667-
echo "base-commit: $(git rev-parse upstream)" >expected &&
1668-
test_cmp expected actual
1667+
echo "base-commit: $(git rev-parse upstream)" >expect &&
1668+
test_cmp expect actual
16691669
'
16701670

16711671
test_expect_success 'format-patch errors out when history involves criss-cross' '
@@ -1701,17 +1701,17 @@ test_expect_success 'format-patch format.useAutoBaseoption' '
17011701
git config format.useAutoBase true &&
17021702
git format-patch --stdout -1 >patch &&
17031703
grep "^base-commit:" patch >actual &&
1704-
echo "base-commit: $(git rev-parse upstream)" >expected &&
1705-
test_cmp expected actual
1704+
echo "base-commit: $(git rev-parse upstream)" >expect &&
1705+
test_cmp expect actual
17061706
'
17071707

17081708
test_expect_success 'format-patch --base overrides format.useAutoBase' '
17091709
test_when_finished "git config --unset format.useAutoBase" &&
17101710
git config format.useAutoBase true &&
17111711
git format-patch --stdout --base=HEAD~1 -1 >patch &&
17121712
grep "^base-commit:" patch >actual &&
1713-
echo "base-commit: $(git rev-parse HEAD~1)" >expected &&
1714-
test_cmp expected actual
1713+
echo "base-commit: $(git rev-parse HEAD~1)" >expect &&
1714+
test_cmp expect actual
17151715
'
17161716

17171717
test_expect_success 'format-patch --base with --attach' '

0 commit comments

Comments
 (0)