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

[PATCH] Fix errors in t6018

From
ILIlari Liusvaara <ilari.liusvaara@elisanet.fi>
Date
Jan 19, 2010, 09:35 UTC
Message-ID
<1263893748-23327-1-git-send-email-ilari.liusvaara@elisanet.fi>
In-Reply-To
<20100119065609.GB3946@coredump.intra.peff.net>
Fix errors and shortcomings in t6018 (the rev-parse --namespace test):
1) Some tests were missing &&'s, leading too possibly missing failures
2) Some tests used incorrect commands (didn't test what they were
suppoed to)
3) Some test used 'cmp' instead of 'test_cmp'
4) Tests only tested output up to permutation
Fix these errors in t6018.
Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
---
This can be appiled on top of rev-parse --namespace patch v3 or this
can be squashed to that patch.
 t/t6018-rev-list-namespace.sh |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/t/t6018-rev-list-namespace.sh b/t/t6018-rev-list-namespace.sh
index 6bb562a..70c8a83 100755
--- a/t/t6018-rev-list-namespace.sh
+++ b/t/t6018-rev-list-namespace.sh
@@ -14,23 +14,23 @@ commit () {
 
 compare () {
 	# Split arguments on whitespace.
-	git $1 $2 | sort >expected &&
-	git $1 $3 | sort >actual &&
-	cmp expected actual
+	git $1 $2 >expected &&
+	git $1 $3 >actual &&
+	test_cmp expected actual
 }
 
 test_expect_success 'setup' '
 
 	commit master &&
-	git checkout -b subspace/one master
+	git checkout -b subspace/one master &&
 	commit one &&
-	git checkout -b subspace/two master
+	git checkout -b subspace/two master &&
 	commit two &&
-	git checkout -b subspace-x master
+	git checkout -b subspace-x master &&
 	commit subspace-x &&
-	git checkout -b other/three master
+	git checkout -b other/three master &&
 	commit three &&
-	git checkout -b someref master
+	git checkout -b someref master &&
 	commit some &&
 	git checkout master &&
 	commit master2
@@ -68,7 +68,7 @@ test_expect_success 'rev-parse --namespace=heads/someref master' '
 
 test_expect_success 'rev-parse --namespace=heads' '
 
-	compare rev-parse "subspace/one subspace/two other/three subspace-x master someref" "--namespace=heads"
+	compare rev-parse "master other/three someref subspace-x subspace/one subspace/two" "--namespace=heads"
 
 '
 
@@ -92,19 +92,19 @@ test_expect_success 'rev-list --namespace=heads/subspace' '
 
 test_expect_success 'rev-list --namespace=heads/someref master' '
 
-	compare rev-parse "master" "--namespace=heads/someref master"
+	compare rev-list "master" "--namespace=heads/someref master"
 
 '
 
 test_expect_success 'rev-list --namespace=heads/subspace --namespace=heads/other' '
 
-	compare rev-parse "subspace/one subspace/two other/three" "--namespace=heads/subspace --namespace=heads/other"
+	compare rev-list "subspace/one subspace/two other/three" "--namespace=heads/subspace --namespace=heads/other"
 
 '
 
 test_expect_success 'rev-list --namespace=heads' '
 
-	compare rev-parse "subspace/one subspace/two other/three subspace-x master someref" "--namespace=heads"
+	compare rev-list "master other/three someref subspace-x subspace/one subspace/two" "--namespace=heads"
 
 '
 
-- 
1.6.6.199.gff4b0
Previous: Jeff KingNext: Junio C Hamano
Message 5 of 14 in “rev-parse --namespace”
  1. rev-parse --namespaceIlari Liusvaara, Jan 18, 2010
  2. Junio C HamanoJan 18, 2010
  3. rev-parse --namespaceIlari Liusvaara, Jan 18, 2010
  4. Jeff KingJan 19, 2010
  5. Fix errors in t6018Ilari Liusvaara, Jan 19, 2010
  6. Junio C HamanoJan 19, 2010
  7. Thomas RastJan 19, 2010
  8. Ilari LiusvaaraJan 19, 2010
  9. Junio C HamanoJan 19, 2010
  10. Ilari LiusvaaraJan 19, 2010
  11. Thomas RastJan 19, 2010
  12. Ilari LiusvaaraJan 19, 2010
  13. Junio C HamanoJan 19, 2010
  14. Johannes SixtJan 20, 2010

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.