Blame gettext-tools/tests/gettext-7
|
Packit Bot |
06c835 |
#! /bin/sh
|
|
Packit Bot |
06c835 |
. "${srcdir=.}/init.sh"; path_prepend_ . ../src
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
# Test that on glibc systems, gettext() in multithreaded applications works
|
|
Packit Bot |
06c835 |
# correctly if different threads operate in different locales referring to
|
|
Packit Bot |
06c835 |
# the same catalog file but with different encodings.
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
# This test works only on glibc and MacOS X systems.
|
|
Packit Bot |
06c835 |
: ${host_os=unknown}
|
|
Packit Bot |
06c835 |
: ${GLIBC2=no}
|
|
Packit Bot |
06c835 |
{ case "$host_os" in
|
|
Packit Bot |
06c835 |
*-gnu*) test "$GLIBC2" = yes ;;
|
|
Packit Bot |
06c835 |
darwin*) true ;;
|
|
Packit Bot |
06c835 |
*) false ;;
|
|
Packit Bot |
06c835 |
esac
|
|
Packit Bot |
06c835 |
} || {
|
|
Packit Bot |
06c835 |
echo "Skipping test: not a glibc or Mac OS X system"
|
|
Packit Bot |
06c835 |
exit 77
|
|
Packit Bot |
06c835 |
}
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
# This test works only on systems that have a de_DE.ISO-8859-1 and
|
|
Packit Bot |
06c835 |
# de_DE.UTF-8 locale installed.
|
|
Packit Bot |
06c835 |
missing_locale=`../gettext-7-prg 1`
|
|
Packit Bot |
06c835 |
if test -n "$missing_locale"; then
|
|
Packit Bot |
06c835 |
if test -f /usr/bin/localedef; then
|
|
Packit Bot |
06c835 |
echo "Skipping test: locale ${missing_locale} not installed"
|
|
Packit Bot |
06c835 |
else
|
|
Packit Bot |
06c835 |
echo "Skipping test: locale ${missing_locale} not supported"
|
|
Packit Bot |
06c835 |
fi
|
|
Packit Bot |
06c835 |
exit 77
|
|
Packit Bot |
06c835 |
fi
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
test -d gt-7 || mkdir gt-7
|
|
Packit Bot |
06c835 |
test -d gt-7/de_DE || mkdir gt-7/de_DE
|
|
Packit Bot |
06c835 |
test -d gt-7/de_DE/LC_MESSAGES || mkdir gt-7/de_DE/LC_MESSAGES
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
: ${MSGFMT=msgfmt}
|
|
Packit Bot |
06c835 |
${MSGFMT} -o gt-7/de_DE/LC_MESSAGES/tstthread.mo "$abs_srcdir"/gettext-7.po
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
../gettext-7-prg > gt-7.out
|
|
Packit Bot |
06c835 |
case $? in
|
|
Packit Bot |
06c835 |
0) ;;
|
|
Packit Bot |
06c835 |
77)
|
|
Packit Bot |
06c835 |
echo "Skipping test: not a glibc >= 2.3 or MacOS X >= 10.5 system"
|
|
Packit Bot |
06c835 |
exit 77
|
|
Packit Bot |
06c835 |
;;
|
|
Packit Bot |
06c835 |
*)
|
|
Packit Bot |
06c835 |
exit 1
|
|
Packit Bot |
06c835 |
;;
|
|
Packit Bot |
06c835 |
esac
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
exit 0
|