1 1.1 christos #! /bin/sh 2 1.1 christos 3 1.1 christos # Test that bind_textdomain_codeset() works. 4 1.1 christos 5 1.1 christos tmpfiles="" 6 1.1 christos trap 'rm -fr $tmpfiles' 1 2 3 15 7 1.1 christos 8 1.1 christos # This test works only on systems that have a traditional french locale 9 1.1 christos # installed. 10 1.1 christos # gettext-4.po is actually a German PO file, but only the encoding of the 11 1.1 christos # locale matters, not the language. configure has already checked whether 12 1.1 christos # a traditional french locale is installed; no need to check also for a 13 1.1 christos # traditional german locale. 14 1.1 christos : ${LOCALE_FR=fr_FR} 15 1.1 christos { test $LOCALE_FR != none && LC_ALL=$LOCALE_FR ./testlocale; } || { 16 1.1 christos if test -f /usr/bin/localedef; then 17 1.1 christos echo "Skipping test: no traditional french locale is installed" 18 1.1 christos else 19 1.1 christos echo "Skipping test: no traditional french locale is supported" 20 1.1 christos fi 21 1.1 christos exit 77 22 1.1 christos } 23 1.1 christos 24 1.1 christos tmpfiles="$tmpfiles fr" 25 1.1 christos test -d fr || mkdir fr 26 1.1 christos test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES 27 1.1 christos 28 1.1 christos : ${MSGFMT=msgfmt} 29 1.1 christos ${MSGFMT} -o fr/LC_MESSAGES/codeset.mo ${top_srcdir}/tests/gettext-4.po 30 1.1 christos 31 1.1 christos ./gettext-4-prg $LOCALE_FR || exit 1 32 1.1 christos 33 1.1 christos rm -fr $tmpfiles 34 1.1 christos 35 1.1 christos exit 0 36