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