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

[PATCH 1/2] test: rename $satisfied to $satisfied_prereq

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 26, 2012, 23:04 UTC
Message-ID
<7vboj25dk7.fsf@alter.siamese.dyndns.org>

All other shell variables that globally keep track of prerequisite related states have "prereq" somewhere in their names. Be consistent and avoid name crashes.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 * Just a preparatory clean-up.
 t/test-lib-functions.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 80daaca..4dc027d 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -221,9 +221,9 @@ write_script () {
 # capital letters by convention).
 
 test_set_prereq () {
-	satisfied="$satisfied$1 "
+	satisfied_prereq="$satisfied_prereq$1 "
 }
-satisfied=" "
+satisfied_prereq=" "
 
 test_have_prereq () {
 	# prerequisites can be concatenated with ','
@@ -239,7 +239,7 @@ test_have_prereq () {
 	for prerequisite
 	do
 		total_prereq=$(($total_prereq + 1))
-		case $satisfied in
+		case "$satisfied_prereq" in
 		*" $prerequisite "*)
 			ok_prereq=$(($ok_prereq + 1))
 			;;
-- 
1.7.12.rc0.44.gc69a8ad
Next: Junio C Hamano
Message 1 of 7 in “test: rename $satisfied to $satisfied_prereq”
  1. 1/2 test: rename $satisfied to $satisfied_prereqJunio C Hamano, Jul 26, 2012
  2. 2/2 test: allow prerequisite to be evaluated lazilyJunio C Hamano, Jul 26, 2012
  3. 3/2 test-lib: provide case insensitivity as a prerequisiteJunio C Hamano, Jul 26, 2012
  4. 4/2 test-lib: provide UTF8 behaviour as a prerequisiteJunio C Hamano, Jul 26, 2012
  5. Jeff KingJul 27, 2012
  6. Jeff KingJul 27, 2012
  7. Junio C HamanoJul 27, 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.