1#! /bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# Test that gettext() in multithreaded applications correctly uses the 5# per-thread locale. 6 7test -d in-th-1 || mkdir in-th-1 8test -d in-th-1/fr || mkdir in-th-1/fr 9test -d in-th-1/fr/LC_MESSAGES || mkdir in-th-1/fr/LC_MESSAGES 10 11: ${MSGFMT=msgfmt} 12${MSGFMT} -o in-th-1/fr/LC_MESSAGES/tstthread.mo "$wabs_srcdir"/intl-thread-1.po 13 14: ${LOCALE_FR=fr_FR} 15: ${LOCALE_FR_UTF8=fr_FR.UTF-8} 16if test $LOCALE_FR != none; then 17 prepare_locale_ in-th-1/fr in-th-1/$LOCALE_FR 18 ../intl-thread-1-prg $LOCALE_FR > in-th-1.out 19 case $? in 20 0) ;; 21 77) 22 echo "Skipping test: POSIX per-thread locales not supported" 23 Exit 77 24 ;; 25 *) 26 Exit 1 27 ;; 28 esac 29fi 30if test $LOCALE_FR_UTF8 != none; then 31 prepare_locale_ in-th-1/fr in-th-1/$LOCALE_FR_UTF8 32 ../intl-thread-1-prg $LOCALE_FR_UTF8 > in-th-1.out 33 case $? in 34 0) ;; 35 77) 36 echo "Skipping test: POSIX per-thread locales not supported" 37 Exit 77 38 ;; 39 *) 40 Exit 1 41 ;; 42 esac 43fi 44if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then 45 if test -f /usr/bin/localedef; then 46 echo "Skipping test: no french locale is installed" 47 else 48 echo "Skipping test: no french locale is supported" 49 fi 50 Exit 77 51fi 52 53Exit 0 54