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

[PATCH] t5510: become resilient to GETTEXT_POISON

From
Vasco Almeida <vascomalmeida@sapo.pt>
Date
Jul 25, 2016, 09:31 UTC
Message-ID
<1469439068-2724-1-git-send-email-vascomalmeida@sapo.pt>

Replace gettext poison text with appropriate values to be able to cut the right output of git fetch command for comparison.

The first gettext poison falls from the previous line into the next because the poison does not add a newline, so we must replace it with nothing.

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
---
 t/t5510-fetch.sh | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 6bd4853..b261223 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -694,7 +694,10 @@ test_expect_success 'fetch aligned output' '
 	(
 		cd full-output &&
 		git -c fetch.output=full fetch origin 2>&1 | \
-			grep -e "->" | cut -c 22- >../actual
+			grep -e "->" | \
+			sed -e "/master/ s/# GETTEXT POISON #//" \
+			    -e "/tag/ s/# GETTEXT POISON #/[new tag]        /" | \
+			cut -c 22- >../actual
 	) &&
 	cat >expect <<-\EOF &&
 	master               -> origin/master
@@ -709,7 +712,10 @@ test_expect_success 'fetch compact output' '
 	(
 		cd compact &&
 		git -c fetch.output=compact fetch origin 2>&1 | \
-			grep -e "->" | cut -c 22- >../actual
+			grep -e "->" | \
+			sed -e "/master/ s/# GETTEXT POISON #//" \
+			    -e "/extraa/ s/# GETTEXT POISON #/[new tag]        /" | \
+			cut -c 22- >../actual
 	) &&
 	cat >expect <<-\EOF &&
 	master     -> origin/*
-- 
2.7.4
Next: Junio C Hamano
Message 1 of 6 in “t5510: become resilient to GETTEXT_POISON”
  1. t5510: become resilient to GETTEXT_POISONVasco Almeida, Jul 25, 2016
  2. Junio C HamanoJul 25, 2016
  3. Duy NguyenJul 25, 2016
  4. t5510: skip tests under GETTEXT_POISON buildVasco Almeida, Jul 26, 2016
  5. Junio C HamanoJul 26, 2016
  6. Ævar Arnfjörð BjarmasonJul 26, 2016

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.