diff options
author | Daiki Ueno <ueno@gnu.org> | 2014-10-01 13:25:03 +0900 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2014-10-01 14:35:51 +0900 |
commit | e860dc2849a0615d8db09804f72152581605874d (patch) | |
tree | 8d58734b892a3e20c0009f34ccea941e310d617f /gettext-tools/tests/lang-c++ | |
parent | ce70d92b4b1bbf6f7be374cb12d2ab94a10eaa36 (diff) | |
download | external_gettext-e860dc2849a0615d8db09804f72152581605874d.zip external_gettext-e860dc2849a0615d8db09804f72152581605874d.tar.gz external_gettext-e860dc2849a0615d8db09804f72152581605874d.tar.bz2 |
tests: Stop redundant textdomain directory creation
This was introduced by commit 3533f6cc when we didn't use separate
test directory for each test. Now that we switched to init.sh, we
don't need to worry about filename conflicts.
Diffstat (limited to 'gettext-tools/tests/lang-c++')
-rwxr-xr-x | gettext-tools/tests/lang-c++ | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/gettext-tools/tests/lang-c++ b/gettext-tools/tests/lang-c++ index 26e4506..4aa4d63 100755 --- a/gettext-tools/tests/lang-c++ +++ b/gettext-tools/tests/lang-c++ @@ -15,7 +15,7 @@ test "${TESTLIBASPRINTF}" = yes || { exit 77 } -cat <<\EOF > l-c++-prog.cc +cat <<\EOF > prog.cc #include "config.h" /* Avoid deprecation warnings from g++ 3.1 or newer. */ @@ -45,7 +45,7 @@ int main (int argc, char *argv[]) exit (77); textdomain ("prog"); - bindtextdomain ("prog", "l-c++"); + bindtextdomain ("prog", "."); cout << _("'Your command, please?', asked the waiter.") << endl; @@ -56,28 +56,28 @@ int main (int argc, char *argv[]) } EOF -# Compile in two steps from .cc to .o and from .o to 'l-c++-prog'. This way, +# Compile in two steps from .cc to .o and from .o to 'prog'. This way, # relinking is faster because doesn't need to redo the first step. # Put the -I flags before ${CXXFLAGS} ${CPPFLAGS}, to make sure that libintl.h # is found in the build directory, regardless of -I options present in # ${CXXFLAGS} or ${CPPFLAGS}. -${CXX} -I../.. -I../../../gettext-runtime/libasprintf -I"$abs_top_srcdir"/gnulib-lib -I../../intl ${CXXFLAGS} ${CPPFLAGS} -c l-c++-prog.cc \ +${CXX} -I../.. -I../../../gettext-runtime/libasprintf -I"$abs_top_srcdir"/gnulib-lib -I../../intl ${CXXFLAGS} ${CPPFLAGS} -c prog.cc \ || exit 1 # Remove the -Wl,--disable-auto-import option here that is added by # woe32-dll.m4. Cygwin 1.7.2 does not support it in C++ mode: It gives # a link error about 'std::cout'. : ${CONFIG_SHELL=${SHELL-/bin/sh}} ${CONFIG_SHELL} "$top_builddir"/libtool --quiet --tag=CXX --mode=link \ - ${CXX} ${CXXFLAGS} `echo "X ${LDFLAGS} " | sed -e 's/^X//' -e 's/ -Wl,--disable-auto-import / /'` -o l-c++-prog l-c++-prog.${OBJEXT} \ + ${CXX} ${CXXFLAGS} `echo "X ${LDFLAGS} " | sed -e 's/^X//' -e 's/ -Wl,--disable-auto-import / /'` -o prog prog.${OBJEXT} \ ../../../gettext-runtime/libasprintf/libasprintf.la \ ../../gnulib-lib/libgettextlib.la ${LTLIBINTL} \ || exit 1 : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-c++-prog.tmp --omit-header --no-location -k_ l-c++-prog.cc || exit 1 -LC_ALL=C tr -d '\r' < l-c++-prog.tmp > l-c++-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location -k_ prog.cc || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-c++-prog.ok +cat <<EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -93,9 +93,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-c++-prog.ok l-c++-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-c++-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -118,26 +118,25 @@ msgstr "%2$s remplace %1$s." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-c++-fr.po.tmp l-c++-fr.po l-c++-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-c++-fr.po.tmp > l-c++-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-c++-fr.po l-c++-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -test -d l-c++ || mkdir l-c++ -test -d l-c++/fr || mkdir l-c++/fr -test -d l-c++/fr/LC_MESSAGES || mkdir l-c++/fr/LC_MESSAGES +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-c++/fr/LC_MESSAGES/prog.mo l-c++-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po : ${DIFF=diff} -cat <<\EOF > l-c++-prog.ok +cat <<\EOF > prog.ok �Votre commande, s'il vous plait�, dit le gar�on. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > l-c++-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -146,17 +145,17 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= ./l-c++-prog $LOCALE_FR 2 > l-c++-prog.out + LANGUAGE= ./prog $LOCALE_FR 2 > prog.out case $? in - 0) ${DIFF} l-c++-prog.ok l-c++-prog.out || exit 1;; + 0) ${DIFF} prog.ok prog.out || exit 1;; 77) LOCALE_FR=none;; *) exit 1;; esac fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= ./l-c++-prog $LOCALE_FR_UTF8 2 > l-c++-prog.out + LANGUAGE= ./prog $LOCALE_FR_UTF8 2 > prog.out case $? in - 0) ${DIFF} l-c++-prog.oku l-c++-prog.out || exit 1;; + 0) ${DIFF} prog.oku prog.out || exit 1;; 77) LOCALE_FR_UTF8=none;; *) exit 1;; esac |