Skip to content

Commit dc662d4

Browse files
jacob-kellergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ce85604 commit dc662d4

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

t/t7004-tag.sh

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,41 +1385,41 @@ test_expect_success 'lexical sort' '
13851385
git tag foo1.6 &&
13861386
git tag foo1.10 &&
13871387
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
13931393
test_cmp expect actual
13941394
'
13951395
13961396
test_expect_success 'version sort' '
13971397
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
14031403
test_cmp expect actual
14041404
'
14051405
14061406
test_expect_success 'reverse version sort' '
14071407
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
14131413
test_cmp expect actual
14141414
'
14151415
14161416
test_expect_success 'reverse lexical sort' '
14171417
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
14231423
test_cmp expect actual
14241424
'
14251425

0 commit comments

Comments
 (0)