[PATCH] t5510: become resilient to GETTEXT_POISON

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]