]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Rename test gettext-4 to intl-4.
authorBruno Haible <bruno@clisp.org>
Sat, 20 Oct 2018 12:52:24 +0000 (14:52 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Oct 2018 18:30:49 +0000 (20:30 +0200)
* 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.

.gitignore
gettext-tools/tests/Makefile.am
gettext-tools/tests/intl-4 [moved from gettext-tools/tests/gettext-4 with 53% similarity]
gettext-tools/tests/intl-4-prg.c [moved from gettext-tools/tests/gettext-4-prg.c with 91% similarity]
gettext-tools/tests/intl-4.po [moved from gettext-tools/tests/gettext-4.po with 100% similarity]

index 6d0f6580387dedf444b23215d5efc964981d46ed..224e0a0039dd12412df18e6e60ad033ecf6b26ff 100644 (file)
@@ -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
index d1c145dec5b4c65e92395486b4ffecbc931e526e..4024a03c9ca487b4df59f95ebe42a73e5557dcdf 100644 (file)
@@ -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
similarity index 53%
rename from gettext-tools/tests/gettext-4
rename to gettext-tools/tests/intl-4
index ba200cae53351384971f5df0b10afde13cb3d651..271d175475d612bbad71ef8bf8b5f54cf840c738 100755 (executable)
@@ -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
similarity index 91%
rename from gettext-tools/tests/gettext-4-prg.c
rename to gettext-tools/tests/intl-4-prg.c
index ad08a2b13fd12637b25fcb46862bf043ec7acedf..e351bd96b0ab889d1535fb5c536c586ec0f0f9ac 100644 (file)
@@ -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");