* 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.
/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
/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
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 \
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 \
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)
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
#! /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
-/* 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
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
}
#endif
- bind_textdomain_codeset ("codeset", "UTF-8");
+ bind_textdomain_codeset ("tstprog", "UTF-8");
/* Here we expect output in UTF-8. */
s = gettext ("cheese");
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");