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

[PATCH v3 1/6] completion: add comment for test_completion()

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Nov 18, 2012, 10:51 UTC
Message-ID
<1353235917-13059-2-git-send-email-felipe.contreras@gmail.com>
In-Reply-To
<1353235917-13059-1-git-send-email-felipe.contreras@gmail.com>
So that it's easier to understand what it does.

Also, make sure we pass only the first argument for completion. Shouldn't cause any functional changes because run_completion only checks $1.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 t/t9902-completion.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index 8fa025f..2276a37 100755
--- a/t/t9902-completion.sh
+++ b/t/t9902-completion.sh
@@ -54,10 +54,14 @@ run_completion ()
 	__git_wrap__git_main && print_comp
 }
 
+# Test high-level completion
+# Arguments are:
+# 1: current command line
+# 2: expected completion
 test_completion ()
 {
 	test $# -gt 1 && echo "$2" > expected
-	run_completion "$@" &&
+	run_completion "$1" &&
 	test_cmp expected out
 }
 
-- 
1.8.0
Previous: Felipe ContrerasNext: Felipe Contreras
Message 2 of 9 in “completion: test consolidations”
  1. 0/6 completion: test consolidationsFelipe Contreras, Nov 18, 2012
  2. 1/6 completion: add comment for test_completion()Felipe Contreras, Nov 18, 2012
  3. 2/6 completion: standardize final space marker in testsFelipe Contreras, Nov 18, 2012
  4. 3/6 completion: simplify tests using test_completion_long()Felipe Contreras, Nov 18, 2012
  5. 4/6 completion: consolidate test_completion*() testsFelipe Contreras, Nov 18, 2012
  6. 5/6 completion: refactor __gitcomp related testsFelipe Contreras, Nov 18, 2012
  7. 6/6 completion: simplify __gitcomp() test helperFelipe Contreras, Nov 18, 2012
  8. Junio C HamanoNov 19, 2012
  9. Felipe ContrerasNov 19, 2012

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.