3 # Test that on glibc systems, gettext() in multithreaded applications works
4 # correctly if different threads operate in different locales with the same
8 trap 'rm -fr $tmpfiles' 1 2 3 15
10 # This test works only on glibc and MacOS X systems.
14 *-gnu*) test "$GLIBC2" = yes ;;
19 echo "Skipping test: not a glibc or Mac OS X system"
23 # This test works only on systems that have a de_DE and fr_FR locale installed.
24 missing_locale=`./gettext-6-prg 1`
25 if test -n "$missing_locale"; then
26 if test -f /usr/bin/localedef; then
27 echo "Skipping test: locale ${missing_locale} not installed"
29 echo "Skipping test: locale ${missing_locale} not supported"
34 tmpfiles="$tmpfiles de_DE fr_FR"
35 test -d de_DE || mkdir de_DE
36 test -d de_DE/LC_MESSAGES || mkdir de_DE/LC_MESSAGES
37 test -d fr_FR || mkdir fr_FR
38 test -d fr_FR/LC_MESSAGES || mkdir fr_FR/LC_MESSAGES
41 ${MSGFMT} -o de_DE/LC_MESSAGES/tstthread.mo ${top_srcdir}/tests/gettext-6-1.po
42 ${MSGFMT} -o fr_FR/LC_MESSAGES/tstthread.mo ${top_srcdir}/tests/gettext-6-2.po
44 tmpfiles="$tmpfiles gt-6.ok"
52 tmpfiles="$tmpfiles gt-6.out"
53 ./gettext-6-prg > gt-6.out
57 echo "Skipping test: not a glibc >= 2.3 or MacOS X >= 10.5 system"
58 rm -fr $tmpfiles; exit 77
63 ${DIFF} gt-6.ok gt-6.out || exit 1