summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2006-06-19 10:49:53 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:13:24 +0200
commit596b8c096bc61a3139e333d59cc032e54aa439e3 (patch)
treec9d5923c39d1f92bcbe1afef6cbb55e4148249db
parente3e90f10021d4576ec33cc7c8e795f6dd440ce23 (diff)
downloadexternal_gettext-596b8c096bc61a3139e333d59cc032e54aa439e3.zip
external_gettext-596b8c096bc61a3139e333d59cc032e54aa439e3.tar.gz
external_gettext-596b8c096bc61a3139e333d59cc032e54aa439e3.tar.bz2
Use an autoconf-determined locale name.
-rw-r--r--gettext-tools/tests/ChangeLog6
-rwxr-xr-xgettext-tools/tests/gettext-424
-rw-r--r--gettext-tools/tests/gettext-4-prg.c4
3 files changed, 23 insertions, 11 deletions
diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog
index 466a2c1..81db331 100644
--- a/gettext-tools/tests/ChangeLog
+++ b/gettext-tools/tests/ChangeLog
@@ -1,3 +1,9 @@
+2006-06-17 Bruno Haible <bruno@clisp.org>
+
+ * gettext-4: Use a french locale instead of a german locale. Pass
+ the locale name as an argument to gettext-4-prg.
+ * gettext-4-prg.c (main): Use the locale name passed as argument.
+
2006-06-04 Bruno Haible <bruno@clisp.org>
* recode-sr-latin-2: Skip the test on MacOS X and BeOS.
diff --git a/gettext-tools/tests/gettext-4 b/gettext-tools/tests/gettext-4
index f70eb18..1e27179 100755
--- a/gettext-tools/tests/gettext-4
+++ b/gettext-tools/tests/gettext-4
@@ -5,24 +5,30 @@
tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15
-# This test works only on systems that have a de_DE.ISO-8859-1 locale installed.
-LC_ALL=de_DE.ISO-8859-1 ./testlocale || {
+# This test works only on systems that have a traditional french locale
+# installed.
+# gettext-4.po is actually a German PO file, but only the encoding of the
+# locale matters, not the language. configure has already checked whether
+# a traditional french locale is installed; no need to check also for a
+# traditional german locale.
+: ${LOCALE_FR=fr_FR}
+{ test $LOCALE_FR != none && LC_ALL=$LOCALE_FR ./testlocale; } || {
if test -f /usr/bin/localedef; then
- echo "Skipping test: locale de_DE.ISO-8859-1 not installed"
+ echo "Skipping test: no traditional french locale is installed"
else
- echo "Skipping test: locale de_DE.ISO-8859-1 not supported"
+ echo "Skipping test: no traditional french locale is supported"
fi
exit 77
}
-tmpfiles="$tmpfiles de_DE"
-test -d de_DE || mkdir de_DE
-test -d de_DE/LC_MESSAGES || mkdir de_DE/LC_MESSAGES
+tmpfiles="$tmpfiles fr_FR"
+test -d fr_FR || mkdir fr_FR
+test -d fr_FR/LC_MESSAGES || mkdir fr_FR/LC_MESSAGES
: ${MSGFMT=msgfmt}
-${MSGFMT} -o de_DE/LC_MESSAGES/codeset.mo ${top_srcdir}/tests/gettext-4.po
+${MSGFMT} -o fr_FR/LC_MESSAGES/codeset.mo ${top_srcdir}/tests/gettext-4.po
-./gettext-4-prg || exit 1
+./gettext-4-prg $LOCALE_FR || exit 1
rm -fr $tmpfiles
diff --git a/gettext-tools/tests/gettext-4-prg.c b/gettext-tools/tests/gettext-4-prg.c
index dea6d48..cc5e805 100644
--- a/gettext-tools/tests/gettext-4-prg.c
+++ b/gettext-tools/tests/gettext-4-prg.c
@@ -33,7 +33,7 @@
#include "libgnuintl.h"
int
-main (void)
+main (int argc, char *argv[])
{
char *s;
int result = 0;
@@ -46,7 +46,7 @@ main (void)
unsetenv ("LANG");
unsetenv ("OUTPUT_CHARSET");
- xsetenv ("LC_ALL", "de_DE.ISO-8859-1", 1);
+ xsetenv ("LC_ALL", argv[1], 1);
setlocale (LC_ALL, "");
textdomain ("codeset");
bindtextdomain ("codeset", ".");