1 1.1 christos #! /bin/sh 2 1.1 christos 3 1.1 christos # Test that on glibc systems, the gettext() results come out in the correct 4 1.1 christos # encoding for locales that differ only in their encoding. 5 1.1 christos 6 1.1 christos tmpfiles="" 7 1.1 christos trap 'rm -fr $tmpfiles' 1 2 3 15 8 1.1 christos 9 1.1 christos # This test works only on glibc systems. 10 1.1 christos grep '@GLIBC2@.*yes' ../config.status >/dev/null || { 11 1.1 christos echo "Skipping test: not a glibc system" 12 1.1 christos exit 77 13 1.1 christos } 14 1.1 christos 15 1.1 christos # This test works only on systems that have a de_DE.ISO-8859-1 and 16 1.1 christos # de_DE.UTF-8 locale installed. 17 1.1 christos LC_ALL=de_DE.ISO-8859-1 ./testlocale || { 18 1.1 christos if test -f /usr/bin/localedef; then 19 1.1 christos echo "Skipping test: locale de_DE.ISO-8859-1 not installed" 20 1.1 christos else 21 1.1 christos echo "Skipping test: locale de_DE.ISO-8859-1 not supported" 22 1.1 christos fi 23 1.1 christos exit 77 24 1.1 christos } 25 1.1 christos LC_ALL=de_DE.UTF-8 ./testlocale || { 26 1.1 christos if test -f /usr/bin/localedef; then 27 1.1 christos echo "Skipping test: locale de_DE.UTF-8 not installed" 28 1.1 christos else 29 1.1 christos echo "Skipping test: locale de_DE.UTF-8 not supported" 30 1.1 christos fi 31 1.1 christos exit 77 32 1.1 christos } 33 1.1 christos 34 1.1 christos tmpfiles="$tmpfiles de_DE" 35 1.1 christos test -d de_DE || mkdir de_DE 36 1.1 christos test -d de_DE/LC_MESSAGES || mkdir de_DE/LC_MESSAGES 37 1.1 christos 38 1.1 christos : ${MSGFMT=msgfmt} 39 1.1 christos ${MSGFMT} -o de_DE/LC_MESSAGES/codeset.mo ${top_srcdir}/tests/gettext-5.po 40 1.1 christos 41 1.1 christos ./gettext-5-prg || exit 1 42 1.1 christos 43 1.1 christos rm -fr $tmpfiles 44 1.1 christos 45 1.1 christos exit 0 46