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 <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Denton Liu committed Aug 27, 2019 at 00:04 UTC b562a54c011a3ef9966ec3d6ac5cfc3a3256f003
1 file changed +53 -53
t/t4014-format-patch.sh
+53 -53
@@ -1209,32 +1209,32 @@ append_signoff()
1209
1210 test_expect_success 'signoff: commit with no body' '
1211 append_signoff </dev/null >actual &&
1212 - cat <<\EOF | sed "s/EOL$//" >expected &&
1212 + cat <<\EOF | sed "s/EOL$//" >expect &&
1213 4:Subject: [PATCH] EOL
1214 8:
1215 9:Signed-off-by: C O Mitter <committer@example.com>
1216 EOF
1217 - test_cmp expected actual
1217 + test_cmp expect actual
1218 '
1219
1220 test_expect_success 'signoff: commit with only subject' '
1221 echo subject | append_signoff >actual &&
1222 - cat >expected <<\EOF &&
1222 + cat >expect <<\EOF &&
1223 4:Subject: [PATCH] subject
1224 8:
1225 9:Signed-off-by: C O Mitter <committer@example.com>
1226 EOF
1227 - test_cmp expected actual
1227 + test_cmp expect actual
1228 '
1229
1230 test_expect_success 'signoff: commit with only subject that does not end with NL' '
1231 printf subject | append_signoff >actual &&
1232 - cat >expected <<\EOF &&
1232 + cat >expect <<\EOF &&
1233 4:Subject: [PATCH] subject
1234 8:
1235 9:Signed-off-by: C O Mitter <committer@example.com>
1236 EOF
1237 - test_cmp expected actual
1237 + test_cmp expect actual
1238 '
1239
1240 test_expect_success 'signoff: no existing signoffs' '
@@ -1243,24 +1243,24 @@ subject
1243
1244 body
1245 EOF
1246 - cat >expected <<\EOF &&
1246 + cat >expect <<\EOF &&
1247 4:Subject: [PATCH] subject
1248 8:
1249 10:
1250 11:Signed-off-by: C O Mitter <committer@example.com>
1251 EOF
1252 - test_cmp expected actual
1252 + test_cmp expect actual
1253 '
1254
1255 test_expect_success 'signoff: no existing signoffs and no trailing NL' '
1256 printf "subject\n\nbody" | append_signoff >actual &&
1257 - cat >expected <<\EOF &&
1257 + cat >expect <<\EOF &&
1258 4:Subject: [PATCH] subject
1259 8:
1260 10:
1261 11:Signed-off-by: C O Mitter <committer@example.com>
1262 EOF
1263 - test_cmp expected actual
1263 + test_cmp expect actual
1264 '
1265
1266 test_expect_success 'signoff: some random signoff' '
@@ -1271,14 +1271,14 @@ body
1271
1272 Signed-off-by: my@house
1273 EOF
1274 - cat >expected <<\EOF &&
1274 + cat >expect <<\EOF &&
1275 4:Subject: [PATCH] subject
1276 8:
1277 10:
1278 11:Signed-off-by: my@house
1279 12:Signed-off-by: C O Mitter <committer@example.com>
1280 EOF
1281 - test_cmp expected actual
1281 + test_cmp expect actual
1282 '
1283
1284 test_expect_success 'signoff: misc conforming footer elements' '
@@ -1292,14 +1292,14 @@ Signed-off-by: my@house
1292 Tested-by: Some One <someone@example.com>
1293 Bug: 1234
1294 EOF
1295 - cat >expected <<\EOF &&
1295 + cat >expect <<\EOF &&
1296 4:Subject: [PATCH] subject
1297 8:
1298 10:
1299 11:Signed-off-by: my@house
1300 15:Signed-off-by: C O Mitter <committer@example.com>
1301 EOF
1302 - test_cmp expected actual
1302 + test_cmp expect actual
1303 '
1304
1305 test_expect_success 'signoff: some random signoff-alike' '
@@ -1309,13 +1309,13 @@ subject
1309 body
1310 Fooled-by-me: my@house
1311 EOF
1312 - cat >expected <<\EOF &&
1312 + cat >expect <<\EOF &&
1313 4:Subject: [PATCH] subject
1314 8:
1315 11:
1316 12:Signed-off-by: C O Mitter <committer@example.com>
1317 EOF
1318 - test_cmp expected actual
1318 + test_cmp expect actual
1319 '
1320
1321 test_expect_success 'signoff: not really a signoff' '
@@ -1324,14 +1324,14 @@ subject
1324
1325 I want to mention about Signed-off-by: here.
1326 EOF
1327 - cat >expected <<\EOF &&
1327 + cat >expect <<\EOF &&
1328 4:Subject: [PATCH] subject
1329 8:
1330 9:I want to mention about Signed-off-by: here.
1331 10:
1332 11:Signed-off-by: C O Mitter <committer@example.com>
1333 EOF
1334 - test_cmp expected actual
1334 + test_cmp expect actual
1335 '
1336
1337 test_expect_success 'signoff: not really a signoff (2)' '
@@ -1341,13 +1341,13 @@ subject
1341 My unfortunate
1342 Signed-off-by: example happens to be wrapped here.
1343 EOF
1344 - cat >expected <<\EOF &&
1344 + cat >expect <<\EOF &&
1345 4:Subject: [PATCH] subject
1346 8:
1347 10:Signed-off-by: example happens to be wrapped here.
1348 11:Signed-off-by: C O Mitter <committer@example.com>
1349 EOF
1350 - test_cmp expected actual
1350 + test_cmp expect actual
1351 '
1352
1353 test_expect_success 'signoff: valid S-o-b paragraph in the middle' '
@@ -1359,7 +1359,7 @@ Signed-off-by: your@house
1359
1360 A lot of houses.
1361 EOF
1362 - cat >expected <<\EOF &&
1362 + cat >expect <<\EOF &&
1363 4:Subject: [PATCH] subject
1364 8:
1365 9:Signed-off-by: my@house
@@ -1368,7 +1368,7 @@ EOF
1368 13:
1369 14:Signed-off-by: C O Mitter <committer@example.com>
1370 EOF
1371 - test_cmp expected actual
1371 + test_cmp expect actual
1372 '
1373
1374 test_expect_success 'signoff: the same signoff at the end' '
@@ -1379,24 +1379,24 @@ body
1379
1380 Signed-off-by: C O Mitter <committer@example.com>
1381 EOF
1382 - cat >expected <<\EOF &&
1382 + cat >expect <<\EOF &&
1383 4:Subject: [PATCH] subject
1384 8:
1385 10:
1386 11:Signed-off-by: C O Mitter <committer@example.com>
1387 EOF
1388 - test_cmp expected actual
1388 + test_cmp expect actual
1389 '
1390
1391 test_expect_success 'signoff: the same signoff at the end, no trailing NL' '
1392 printf "subject\n\nSigned-off-by: C O Mitter <committer@example.com>" |
1393 append_signoff >actual &&
1394 - cat >expected <<\EOF &&
1394 + cat >expect <<\EOF &&
1395 4:Subject: [PATCH] subject
1396 8:
1397 9:Signed-off-by: C O Mitter <committer@example.com>
1398 EOF
1399 - test_cmp expected actual
1399 + test_cmp expect actual
1400 '
1401
1402 test_expect_success 'signoff: the same signoff NOT at the end' '
@@ -1408,14 +1408,14 @@ body
1408 Signed-off-by: C O Mitter <committer@example.com>
1409 Signed-off-by: my@house
1410 EOF
1411 - cat >expected <<\EOF &&
1411 + cat >expect <<\EOF &&
1412 4:Subject: [PATCH] subject
1413 8:
1414 10:
1415 11:Signed-off-by: C O Mitter <committer@example.com>
1416 12:Signed-off-by: my@house
1417 EOF
1418 - test_cmp expected actual
1418 + test_cmp expect actual
1419 '
1420
1421 test_expect_success 'signoff: tolerate garbage in conforming footer' '
@@ -1428,13 +1428,13 @@ Tested-by: my@house
1428 Some Trash
1429 Signed-off-by: C O Mitter <committer@example.com>
1430 EOF
1431 - cat >expected <<\EOF &&
1431 + cat >expect <<\EOF &&
1432 4:Subject: [PATCH] subject
1433 8:
1434 10:
1435 13:Signed-off-by: C O Mitter <committer@example.com>
1436 EOF
1437 - test_cmp expected actual
1437 + test_cmp expect actual
1438 '
1439
1440 test_expect_success 'signoff: respect trailer config' '
@@ -1444,13 +1444,13 @@ subject
1444 Myfooter: x
1445 Some Trash
1446 EOF
1447 - cat >expected <<\EOF &&
1447 + cat >expect <<\EOF &&
1448 4:Subject: [PATCH] subject
1449 8:
1450 11:
1451 12:Signed-off-by: C O Mitter <committer@example.com>
1452 EOF
1453 - test_cmp expected actual &&
1453 + test_cmp expect actual &&
1454
1455 test_config trailer.Myfooter.ifexists add &&
1456 append_signoff <<\EOF >actual &&
@@ -1459,12 +1459,12 @@ subject
1459 Myfooter: x
1460 Some Trash
1461 EOF
1462 - cat >expected <<\EOF &&
1462 + cat >expect <<\EOF &&
1463 4:Subject: [PATCH] subject
1464 8:
1465 11:Signed-off-by: C O Mitter <committer@example.com>
1466 EOF
1467 - test_cmp expected actual
1467 + test_cmp expect actual
1468 '
1469
1470 test_expect_success 'signoff: footer begins with non-signoff without @ sign' '
@@ -1479,13 +1479,13 @@ Change-id: Ideadbeef
1479 Signed-off-by: C O Mitter <committer@example.com>
1480 Bug: 1234
1481 EOF
1482 - cat >expected <<\EOF &&
1482 + cat >expect <<\EOF &&
1483 4:Subject: [PATCH] subject
1484 8:
1485 10:
1486 14:Signed-off-by: C O Mitter <committer@example.com>
1487 EOF
1488 - test_cmp expected actual
1488 + test_cmp expect actual
1489 '
1490
1491 test_expect_success 'format patch ignores color.ui' '
@@ -1604,13 +1604,13 @@ test_expect_success 'format-patch --base' '
1604 git checkout patchid &&
1605 git format-patch --stdout --base=HEAD~3 -1 | tail -n 7 >actual1 &&
1606 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 &&
1614 echo >fail &&
1615 echo "base-commit: $(git rev-parse HEAD~3)" >>fail &&
1616 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
1625 test_must_fail git format-patch --base=HEAD~1 -2 &&
1626 git format-patch --stdout --base=HEAD~2 -2 >patch &&
1627 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
1630 '
1631
1632 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
1652 test_must_fail git format-patch --base=$(cat commit-id-Z) -3 &&
1653 git format-patch --stdout --base=$(cat commit-id-base) -3 >patch &&
1654 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
1657 '
1658
1659 test_expect_success 'format-patch --base=auto' '
@@ -1664,8 +1664,8 @@ test_expect_success 'format-patch --base=auto' '
1664 test_commit N2 &&
1665 git format-patch --stdout --base=auto -2 >patch &&
1666 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
1669 '
1670
1671 test_expect_success 'format-patch errors out when history involves criss-cross' '
@@ -1701,8 +1701,8 @@ test_expect_success 'format-patch format.useAutoBaseoption' '
1701 git config format.useAutoBase true &&
1702 git format-patch --stdout -1 >patch &&
1703 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
1706 '
1707
1708 test_expect_success 'format-patch --base overrides format.useAutoBase' '
@@ -1710,8 +1710,8 @@ test_expect_success 'format-patch --base overrides format.useAutoBase' '
1710 git config format.useAutoBase true &&
1711 git format-patch --stdout --base=HEAD~1 -1 >patch &&
1712 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
1715 '
1716
1717 test_expect_success 'format-patch --base with --attach' '