Branch
Hash :
d3d8e7c9
Author :
Date :
2024-12-09T09:51:01
quotearg tests: Fix test failure (regression yesterday). * tests/testlocale/fr/LC_MESSAGES/gnulib.po: Renamed from tests/testlocale/fr/LC_MESSAGES/test-quotearg.po. * tests/testlocale/fr/LC_MESSAGES/gnulib.mo: Renamed from tests/testlocale/fr/LC_MESSAGES/test-quotearg.mo. * tests/test-quotearg.c (main): Use bindtextdomain for the domain "gnulib", not "test-quotearg". * tests/test-quotearg.sh: Fix typo in comments. * modules/quotearg-tests (Files): Update.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
#!/bin/sh
# Choose an existing locale. The locale encoding does not matter; see the
# comment in test-quotearg.po.
if test $LOCALE_FR_UTF8 != none; then
locale=$LOCALE_FR_UTF8
else
if test $LOCALE_FR != none; then
locale=$LOCALE_FR
else
locale=none
fi
fi
# Work around a limitation of gettext() on native Windows in gettext 0.18.1:
# the locale identifiers in the environment variables LC_ALL etc. have to
# be in Unix conventions, not in native Windows conventions.
if test $locale = French_France.65001; then
locale=fr_FR.UTF-8
fi
if test $locale = French_France.1252; then
locale=fr_FR.CP1252
fi
# Work around a bug on Solaris 11 systems with no GNU gettext installed.
# See gettext/gettext-tools/tests/init.cfg.
localedir="$srcdir/testlocale"
if test $locale != none && test $locale != fr; then
case "$host_os" in
solaris2.11)
mkdir -p testlocale
cp -R "$srcdir/testlocale/fr" "testlocale/$locale"
localedir="testlocale"
;;
esac
fi
LOCALE=$locale LOCALEDIR="$localedir" \
${CHECKER} ./test-quotearg${EXEEXT}
result=$?
if test $locale != none && test $locale != fr; then
case "$host_os" in
solaris2.11)
rm -rf "testlocale/$locale"
rmdir testlocale 2>/dev/null
;;
esac
fi
exit $result