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

[PATCH] t0200: "locale" may not exist

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 19, 2012, 06:47 UTC
Message-ID
<7vlicubkt4.fsf@alter.siamese.dyndns.org>

On systems without "locale" installed, t0200-gettext-basic.sh leaked error messages when checking if some test locales are available. Hide them, as they are not very useful.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 t/lib-gettext.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/t/lib-gettext.sh b/t/lib-gettext.sh
index 0f76f6c..ae8883a 100644
--- a/t/lib-gettext.sh
+++ b/t/lib-gettext.sh
@@ -14,12 +14,14 @@ export GIT_TEXTDOMAINDIR GIT_PO_PATH
 if test_have_prereq GETTEXT && ! test_have_prereq GETTEXT_POISON
 then
 	# is_IS.UTF-8 on Solaris and FreeBSD, is_IS.utf8 on Debian
-	is_IS_locale=$(locale -a | sed -n '/^is_IS\.[uU][tT][fF]-*8$/{
+	is_IS_locale=$(locale -a 2>/dev/null |
+		sed -n '/^is_IS\.[uU][tT][fF]-*8$/{
 		p
 		q
 	}')
 	# is_IS.ISO8859-1 on Solaris and FreeBSD, is_IS.iso88591 on Debian
-	is_IS_iso_locale=$(locale -a | sed -n '/^is_IS\.[iI][sS][oO]8859-*1$/{
+	is_IS_iso_locale=$(locale -a 2>/dev/null |
+		sed -n '/^is_IS\.[iI][sS][oO]8859-*1$/{
 		p
 		q
 	}')
-- 
1.8.1.rc2.196.g654d69e
Next: Jeff King
Message 1 of 4 in “t0200: "locale" may not exist”
  1. t0200: "locale" may not existJunio C Hamano, Dec 19, 2012
  2. Jeff KingDec 19, 2012
  3. Junio C HamanoDec 19, 2012
  4. Jeff KingDec 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.