mirror of
https://github.com/php-win-ext/gettext.git
synced 2026-04-28 11:33:12 +02:00
37 lines
1.0 KiB
Bash
37 lines
1.0 KiB
Bash
#! /bin/sh
|
|
|
|
# Test that bind_textdomain_codeset() works.
|
|
|
|
tmpfiles=""
|
|
trap 'rm -fr $tmpfiles' 1 2 3 15
|
|
|
|
# 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
|
|
# 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 -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
|
|
}
|
|
|
|
tmpfiles="$tmpfiles gt-4"
|
|
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 ${top_srcdir}/tests/gettext-4.po
|
|
|
|
./gettext-4-prg $LOCALE_FR || exit 1
|
|
|
|
rm -fr $tmpfiles
|
|
|
|
exit 0
|