From: Bruno Haible Date: Sat, 20 Oct 2018 12:52:24 +0000 (+0200) Subject: Rename test gettext-4 to intl-4. X-Git-Tag: v0.20~320 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=833b11bec09cd2d274f5eda7c09df2e83634114a;p=thirdparty%2Fgettext.git Rename test gettext-4 to intl-4. * gettext-tools/tests/intl-4: Renamed from gettext-tools/tests/gettext-4. * gettext-tools/tests/intl-4-prg.c: Renamed from gettext-tools/tests/gettext-4-prg.c. * gettext-tools/tests/intl-4.po: Renamed from gettext-tools/tests/gettext-4.po. * gettext-tools/tests/Makefile.am: Update. --- diff --git a/.gitignore b/.gitignore index 6d0f65803..224e0a003 100644 --- a/.gitignore +++ b/.gitignore @@ -659,8 +659,6 @@ autom4te.cache/ /gettext-tools/tests/fc4.exe /gettext-tools/tests/fc5 /gettext-tools/tests/fc5.exe -/gettext-tools/tests/gettext-4-prg -/gettext-tools/tests/gettext-4-prg.exe /gettext-tools/tests/gettext-5-prg /gettext-tools/tests/gettext-5-prg.exe /gettext-tools/tests/gettext-6-prg @@ -675,6 +673,8 @@ autom4te.cache/ /gettext-tools/tests/intl-1-prg.exe /gettext-tools/tests/intl-3-prg /gettext-tools/tests/intl-3-prg.exe +/gettext-tools/tests/intl-4-prg +/gettext-tools/tests/intl-4-prg.exe /gettext-tools/tests/intl-setlocale-1-prg /gettext-tools/tests/intl-setlocale-1-prg.exe /gettext-tools/tests/sentence-1-prg diff --git a/gettext-tools/tests/Makefile.am b/gettext-tools/tests/Makefile.am index d1c145dec..4024a03c9 100644 --- a/gettext-tools/tests/Makefile.am +++ b/gettext-tools/tests/Makefile.am @@ -21,9 +21,9 @@ EXTRA_DIST = MOSTLYCLEANFILES = core *.stackdump TESTS = gettext-1 gettext-2 \ - intl-1 intl-2 intl-3 \ + intl-1 intl-2 intl-3 intl-4 \ intl-setlocale-1 \ - gettext-4 gettext-5 gettext-6 gettext-7 gettext-8 \ + gettext-5 gettext-6 gettext-7 gettext-8 \ msgattrib-1 msgattrib-2 msgattrib-3 msgattrib-4 msgattrib-5 \ msgattrib-6 msgattrib-7 msgattrib-8 msgattrib-9 msgattrib-10 \ msgattrib-11 msgattrib-12 msgattrib-13 msgattrib-14 msgattrib-15 \ @@ -163,9 +163,9 @@ EXTRA_DIST += init.sh init.cfg $(TESTS) \ msguniq-a.in msguniq-a.inp msguniq-a.out \ qttest_pl.po qttest_pl.qm \ qttest2_de.po qttest2_de.qm qttest2_de.ts \ - intl-1.po intl-2-1.po intl-2-2.po \ + intl-1.po intl-2-1.po intl-2-2.po intl-4.po \ intl-setlocale-1-1.po intl-setlocale-1-2.po \ - gettext-4.po gettext-5.po gettext-6-1.po gettext-6-2.po gettext-7.po \ + gettext-5.po gettext-6-1.po gettext-6-2.po gettext-7.po \ gettextpo-1.de.po \ xgettext-1 \ xgettext-c-1 xg-c-21.c \ @@ -222,7 +222,7 @@ DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ LDADD = $(LDADD_@USE_INCLUDED_LIBINTL@) @INTL_MACOSX_LIBS@ LDADD_yes = ../intl/libintl.la @LTLIBTHREAD@ LDADD_no = ../intl/libgnuintl.la @LTLIBTHREAD@ @LTLIBINTL@ -check_PROGRAMS = tstgettext tstngettext testlocale intl-1-prg intl-3-prg intl-setlocale-1-prg gettext-4-prg gettext-5-prg gettext-6-prg gettext-7-prg gettext-8-prg cake fc3 fc4 fc5 gettextpo-1-prg sentence-1-prg +check_PROGRAMS = tstgettext tstngettext testlocale intl-1-prg intl-3-prg intl-4-prg intl-setlocale-1-prg gettext-5-prg gettext-6-prg gettext-7-prg gettext-8-prg cake fc3 fc4 fc5 gettextpo-1-prg sentence-1-prg tstgettext_SOURCES = tstgettext.c setlocale.c tstgettext_CFLAGS = -DINSTALLDIR=\".\" tstgettext_LDADD = ../gnulib-lib/libgettextlib.la $(LDADD) @@ -234,10 +234,10 @@ intl_1_prg_SOURCES = intl-1-prg.c intl_1_prg_LDADD = ../gnulib-lib/libgettextlib.la $(LDADD) intl_3_prg_SOURCES = intl-3-prg.c intl_3_prg_LDADD = ../gnulib-lib/libgettextlib.la $(LDADD) +intl_4_prg_SOURCES = intl-4-prg.c +intl_4_prg_LDADD = ../gnulib-lib/libgettextlib.la $(LDADD) intl_setlocale_1_prg_SOURCES = intl-setlocale-1-prg.c intl_setlocale_1_prg_LDADD = ../gnulib-lib/libgettextlib.la $(LDADD) -gettext_4_prg_SOURCES = gettext-4-prg.c -gettext_4_prg_LDADD = ../gnulib-lib/libgettextlib.la $(LDADD) gettext_5_prg_SOURCES = gettext-5-prg.c gettext_5_prg_LDADD = ../gnulib-lib/libgettextlib.la $(LDADD) gettext_6_prg_SOURCES = gettext-6-prg.c diff --git a/gettext-tools/tests/gettext-4 b/gettext-tools/tests/intl-4 similarity index 53% rename from gettext-tools/tests/gettext-4 rename to gettext-tools/tests/intl-4 index ba200cae5..271d17547 100755 --- a/gettext-tools/tests/gettext-4 +++ b/gettext-tools/tests/intl-4 @@ -1,31 +1,33 @@ #! /bin/sh . "${srcdir=.}/init.sh"; path_prepend_ . ../src -# Test that bind_textdomain_codeset() works. +# Test that bind_textdomain_codeset() works, even when the same message +# was already looked up for a different codeset. + +test -d in-4 || mkdir in-4 +test -d in-4/fr || mkdir in-4/fr +test -d in-4/fr/LC_MESSAGES || mkdir in-4/fr/LC_MESSAGES + +: ${MSGFMT=msgfmt} +${MSGFMT} -o in-4/fr/LC_MESSAGES/tstprog.mo "$abs_srcdir"/intl-4.po # 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 +# intl-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 $LOCALE_FR != none; then + prepare_locale_ in-4/fr in-4/$LOCALE_FR + ../intl-4-prg $LOCALE_FR || Exit 1 +else if test -f /usr/bin/localedef; then echo "Skipping test: no traditional french locale is installed" else echo "Skipping test: no traditional french locale is supported" fi Exit 77 -} - -test -d gt-4 || mkdir gt-4 -test -d gt-4/fr || mkdir gt-4/fr -test -d gt-4/fr/LC_MESSAGES || mkdir gt-4/fr/LC_MESSAGES - -: ${MSGFMT=msgfmt} -${MSGFMT} -o gt-4/fr/LC_MESSAGES/codeset.mo "$abs_srcdir"/gettext-4.po - -../gettext-4-prg $LOCALE_FR || Exit 1 +fi Exit 0 diff --git a/gettext-tools/tests/gettext-4-prg.c b/gettext-tools/tests/intl-4-prg.c similarity index 91% rename from gettext-tools/tests/gettext-4-prg.c rename to gettext-tools/tests/intl-4-prg.c index ad08a2b13..e351bd96b 100644 --- a/gettext-tools/tests/gettext-4-prg.c +++ b/gettext-tools/tests/intl-4-prg.c @@ -1,4 +1,4 @@ -/* Test program, used by the gettext-4 test. +/* Test program, used by the intl-4 test. Copyright (C) 2001, 2005-2006, 2013, 2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -47,8 +47,8 @@ main (int argc, char *argv[]) xsetenv ("LC_ALL", argv[1], 1); setlocale (LC_ALL, ""); - textdomain ("codeset"); - bindtextdomain ("codeset", "gt-4"); + textdomain ("tstprog"); + bindtextdomain ("tstprog", "in-4"); /* Here we expect output in ISO-8859-1. Except on Darwin 7 or newer and on BeOS and Haiku, for which @@ -62,7 +62,7 @@ main (int argc, char *argv[]) } #endif - bind_textdomain_codeset ("codeset", "UTF-8"); + bind_textdomain_codeset ("tstprog", "UTF-8"); /* Here we expect output in UTF-8. */ s = gettext ("cheese"); @@ -72,7 +72,7 @@ main (int argc, char *argv[]) result = 1; } - bind_textdomain_codeset ("codeset", "ISO-8859-1"); + bind_textdomain_codeset ("tstprog", "ISO-8859-1"); /* Here we expect output in ISO-8859-1. */ s = gettext ("cheese"); diff --git a/gettext-tools/tests/gettext-4.po b/gettext-tools/tests/intl-4.po similarity index 100% rename from gettext-tools/tests/gettext-4.po rename to gettext-tools/tests/intl-4.po