tag: fix --sort tests to use cat<<-\EOF format
The --sort tests should use the better format for >expect to maintain indenting and ensure that no substitution is occurring. This makes parsing and understanding the tests a bit easier. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jacob Keller committed
Jul 11, 2014 at 15:55 UTC
dc662d449f56cb969025db4fe54fa3374777495c
1 file changed
+20
-20
t/t7004-tag.sh
+20
-20
@@ -1385,41 +1385,41 @@ test_expect_success 'lexical sort' '
1385
git tag foo1.6 &&
1386
git tag foo1.10 &&
1387
git tag -l --sort=refname "foo*" >actual &&
1388
- cat >expect <<EOF &&
1389
-foo1.10
1390
-foo1.3
1391
-foo1.6
1392
-EOF
1388
+ cat >expect <<-\EOF &&
1389
+ foo1.10
1390
+ foo1.3
1391
+ foo1.6
1392
+ EOF
1393
test_cmp expect actual
1394
'
1395
1396
test_expect_success 'version sort' '
1397
git tag -l --sort=version:refname "foo*" >actual &&
1398
- cat >expect <<EOF &&
1399
-foo1.3
1400
-foo1.6
1401
-foo1.10
1402
-EOF
1398
+ cat >expect <<-\EOF &&
1399
+ foo1.3
1400
+ foo1.6
1401
+ foo1.10
1402
+ EOF
1403
test_cmp expect actual
1404
'
1405
1406
test_expect_success 'reverse version sort' '
1407
git tag -l --sort=-version:refname "foo*" >actual &&
1408
- cat >expect <<EOF &&
1409
-foo1.10
1410
-foo1.6
1411
-foo1.3
1412
-EOF
1408
+ cat >expect <<-\EOF &&
1409
+ foo1.10
1410
+ foo1.6
1411
+ foo1.3
1412
+ EOF
1413
test_cmp expect actual
1414
'
1415
1416
test_expect_success 'reverse lexical sort' '
1417
git tag -l --sort=-refname "foo*" >actual &&
1418
- cat >expect <<EOF &&
1419
-foo1.6
1420
-foo1.3
1421
-foo1.10
1422
-EOF
1418
+ cat >expect <<-\EOF &&
1419
+ foo1.6
1420
+ foo1.3
1421
+ foo1.10
1422
+ EOF
1423
test_cmp expect actual
1424
'
1425