diff options
Diffstat (limited to 'gettext-tools/tests')
-rw-r--r-- | gettext-tools/tests/ChangeLog | 6 | ||||
-rwxr-xr-x | gettext-tools/tests/gettext-4 | 24 | ||||
-rw-r--r-- | gettext-tools/tests/gettext-4-prg.c | 4 |
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", "."); |