git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v9 2/4] tag: fix --sort tests to use cat<<-\EOF format

From
Jacob Keller <jacob.e.keller@intel.com>
Date
Jul 15, 2014, 23:32 UTC
Message-ID
<1405467179-16064-2-git-send-email-jacob.e.keller@intel.com>
In-Reply-To
<1405467179-16064-1-git-send-email-jacob.e.keller@intel.com>

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>
---
 t/t7004-tag.sh | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index e4ab0f5b6419..66010b0e7066 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -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
 '
 
-- 
2.0.1.475.g9b8d714
Previous: Jacob KellerNext: Jacob Keller
Message 2 of 11 in “usage: make error functions a stack”
  1. 1/4 usage: make error functions a stackJacob Keller, Jul 15, 2014
  2. 2/4 tag: fix --sort tests to use cat<<-\EOF formatJacob Keller, Jul 15, 2014
  3. 3/4 tag: update parsing to be more precise regarding errorsJacob Keller, Jul 15, 2014
  4. 4/4 tag: support configuring --sort via .gitconfigJacob Keller, Jul 15, 2014
  5. Jeff KingJul 15, 2014
  6. Keller, Jacob EJul 15, 2014
  7. Junio C HamanoJul 16, 2014
  8. Keller, Jacob EJul 16, 2014
  9. Keller, Jacob EJul 16, 2014
  10. Junio C HamanoJul 16, 2014
  11. Keller, Jacob EJul 16, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.