git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t5510: become resilient to GETTEXT_POISON
@ 2016-07-25  9:31 Vasco Almeida
  2016-07-25 15:16 ` Junio C Hamano
  2016-07-26 12:58 ` [PATCH] t5510: skip tests under GETTEXT_POISON build Vasco Almeida
  0 siblings, 2 replies; 6+ messages in thread
From: Vasco Almeida @ 2016-07-25  9:31 UTC (permalink / raw)
  To: git; +Cc: Vasco Almeida, Nguyễn Thái Ngọc Duy

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-07-26 20:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-25  9:31 [PATCH] t5510: become resilient to GETTEXT_POISON Vasco Almeida
2016-07-25 15:16 ` Junio C Hamano
2016-07-25 16:07   ` Duy Nguyen
2016-07-26 12:58 ` [PATCH] t5510: skip tests under GETTEXT_POISON build Vasco Almeida
2016-07-26 16:53   ` Junio C Hamano
2016-07-26 20:11     ` Ævar Arnfjörð Bjarmason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).