Skip to content

Commit

Permalink
tag: fix --sort tests to use cat<<-\EOF format
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jacob Keller authored and Junio C Hamano committed Jul 13, 2014
1 parent ce85604 commit dc662d4
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions t/t7004-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1385,41 +1385,41 @@ test_expect_success 'lexical sort' '
git tag foo1.6 &&
git tag foo1.10 &&
git tag -l --sort=refname "foo*" >actual &&
cat >expect <<EOF &&
foo1.10
foo1.3
foo1.6
EOF
cat >expect <<-\EOF &&
foo1.10
foo1.3
foo1.6
EOF
test_cmp expect actual
'
test_expect_success 'version sort' '
git tag -l --sort=version:refname "foo*" >actual &&
cat >expect <<EOF &&
foo1.3
foo1.6
foo1.10
EOF
cat >expect <<-\EOF &&
foo1.3
foo1.6
foo1.10
EOF
test_cmp expect actual
'
test_expect_success 'reverse version sort' '
git tag -l --sort=-version:refname "foo*" >actual &&
cat >expect <<EOF &&
foo1.10
foo1.6
foo1.3
EOF
cat >expect <<-\EOF &&
foo1.10
foo1.6
foo1.3
EOF
test_cmp expect actual
'
test_expect_success 'reverse lexical sort' '
git tag -l --sort=-refname "foo*" >actual &&
cat >expect <<EOF &&
foo1.6
foo1.3
foo1.10
EOF
cat >expect <<-\EOF &&
foo1.6
foo1.3
foo1.10
EOF
test_cmp expect actual
'
Expand Down

0 comments on commit dc662d4

Please sign in to comment.