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