Branch
Hash :
c4bc471b
Author :
Date :
2024-08-31T19:22:37
tests: Strengthen LC_CTYPE tests on OpenBSD, Android, Haiku. * m4/locale-en.m4: New file, based on m4/locale-fr.m4. * m4/locale-ar.m4 (gt_LOCALE_AR): Update comments. * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise. * m4/locale-ja.m4 (gt_LOCALE_JA): Likewise. * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise. * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise. * modules/btoc32-tests (Files): Add m4/locale-en.m4. (configure.ac): Invoke gt_LOCALE_EN_UTF8. (Makefile.am): Set LOCALE_EN_UTF8 in TESTS_ENVIRONMENT. * modules/btowc-tests: Likewise. * modules/c32isalnum-tests: Likewise. * modules/c32isalpha-tests: Likewise. * modules/c32isblank-tests: Likewise. * modules/c32iscntrl-tests: Likewise. * modules/c32isdigit-tests: Likewise. * modules/c32isgraph-tests: Likewise. * modules/c32islower-tests: Likewise. * modules/c32isprint-tests: Likewise. * modules/c32ispunct-tests: Likewise. * modules/c32isspace-tests: Likewise. * modules/c32isupper-tests: Likewise. * modules/c32isxdigit-tests: Likewise. * modules/c32rtomb-tests: Likewise. * modules/c32snrtombs-tests: Likewise. * modules/c32srtombs-tests: Likewise. * modules/c32stombs-tests: Likewise. * modules/c32tolower-tests: Likewise. * modules/c32toupper-tests: Likewise. * modules/fnmatch-tests: Likewise. * modules/iswdigit-tests: Likewise. * modules/iswxdigit-tests: Likewise. * modules/mbmemcasecmp-tests: Likewise. * modules/mbmemcasecoll-tests: Likewise. * modules/mbrlen-tests: Likewise. * modules/mbrtoc16-tests: Likewise. * modules/mbrtoc32-tests: Likewise. * modules/mbrtowc-tests: Likewise. * modules/mbscasestr-tests: Likewise. * modules/mbscspn-tests: Likewise. * modules/mbsinit-tests: Likewise. * modules/mbslen-tests: Likewise. * modules/mbsnlen-tests: Likewise. * modules/mbsnrtoc32s-tests: Likewise. * modules/mbsnrtowcs-tests: Likewise. * modules/mbspbrk-tests: Likewise. * modules/mbsrtoc32s-tests: Likewise. * modules/mbsrtowcs-tests: Likewise. * modules/mbsspn-tests: Likewise. * modules/mbsstr-tests: Likewise. * modules/mbstoc32s-tests: Likewise. * modules/mbstowcs-tests: Likewise. * modules/mcel-tests: Likewise. * modules/trim-tests: Likewise. * modules/unicodeio-tests: Likewise. * modules/wcrtomb-tests: Likewise. * modules/wcsnrtombs-tests: Likewise. * modules/wcsrtombs-tests: Likewise. * tests/test-btoc32-3.sh: If LOCALE_FR_UTF8 is 'none', try LOCALE_EN_UTF8 instead. * tests/test-btowc-3.sh: Likewise. * tests/test-c32isalnum.sh: Likewise. * tests/test-c32isalpha.sh: Likewise. * tests/test-c32isblank.sh: Likewise. * tests/test-c32iscntrl.sh: Likewise. * tests/test-c32isdigit.sh: Likewise. * tests/test-c32isgraph.sh: Likewise. * tests/test-c32islower.sh: Likewise. * tests/test-c32isprint.sh: Likewise. * tests/test-c32ispunct.sh: Likewise. * tests/test-c32isspace.sh: Likewise. * tests/test-c32isupper.sh: Likewise. * tests/test-c32isxdigit.sh: Likewise. * tests/test-c32rtomb.sh: Likewise. * tests/test-c32snrtombs-3.sh: Likewise. * tests/test-c32srtombs-3.sh: Likewise. * tests/test-c32stombs-3.sh: Likewise. * tests/test-c32tolower.sh: Likewise. * tests/test-c32toupper.sh: Likewise. * tests/test-fnmatch-3.sh: Likewise. * tests/test-iswdigit.sh: Likewise. * tests/test-iswxdigit.sh: Likewise. * tests/test-mbmemcasecmp-3.sh: Likewise. * tests/test-mbmemcasecoll-3.sh: Likewise. * tests/test-mbrlen-3.sh: Likewise. * tests/test-mbrtoc16-3.sh: Likewise. * tests/test-mbrtoc32-3.sh: Likewise. * tests/test-mbrtowc-3.sh: Likewise. * tests/test-mbscasestr2.sh: Likewise. * tests/test-mbscspn.sh: Likewise. * tests/test-mbsinit.sh: Likewise. * tests/test-mbslen.sh: Likewise. * tests/test-mbsnlen.sh: Likewise. * tests/test-mbsnrtoc32s-3.sh: Likewise. * tests/test-mbsnrtowcs-3.sh: Likewise. * tests/test-mbspbrk.sh: Likewise. * tests/test-mbsrtoc32s-3.sh: Likewise. * tests/test-mbsrtowcs-3.sh: Likewise. * tests/test-mbsspn.sh: Likewise. * tests/test-mbsstr2.sh: Likewise. * tests/test-mbstoc32s-3.sh: Likewise. * tests/test-mbstowcs-3.sh: Likewise. * tests/test-mcel-3.sh: Likewise. * tests/test-trim2.sh: Likewise. * tests/test-unicodeio2.sh: Likewise. * tests/test-wcrtomb.sh: Likewise. * tests/test-wcsnrtombs-3.sh: Likewise. * tests/test-wcsrtombs-3.sh: Likewise.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
#!/bin/sh
# Test in the POSIX locale.
LC_ALL=C ${CHECKER} ./test-c32isblank${EXEEXT} 0 || exit 1
LC_ALL=POSIX ${CHECKER} ./test-c32isblank${EXEEXT} 0 || exit 1
# Test in an ISO-8859-1 or ISO-8859-15 locale.
: "${LOCALE_FR=fr_FR}"
if test $LOCALE_FR != none; then
LC_ALL=$LOCALE_FR \
${CHECKER} ./test-c32isblank${EXEEXT} 1 \
|| exit 1
fi
# Test whether a specific EUC-JP locale is installed.
: "${LOCALE_JA=ja_JP}"
if test $LOCALE_JA != none; then
LC_ALL=$LOCALE_JA \
${CHECKER} ./test-c32isblank${EXEEXT} 2 \
|| exit 1
fi
# Test whether a specific UTF-8 locale is installed.
: "${LOCALE_EN_UTF8=en_US.UTF-8}"
: "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
if test "$LOCALE_EN_UTF8" != none || test $LOCALE_FR_UTF8 != none; then
# It's sufficient to test in one of the two locales.
if test $LOCALE_FR_UTF8 != none; then
testlocale=$LOCALE_FR_UTF8
else
testlocale="$LOCALE_EN_UTF8"
fi
LC_ALL="$testlocale" \
${CHECKER} ./test-c32isblank${EXEEXT} 3 \
|| exit 1
fi
# Test whether a specific GB18030 locale is installed.
: "${LOCALE_ZH_CN=zh_CN.GB18030}"
if test $LOCALE_ZH_CN != none; then
LC_ALL=$LOCALE_ZH_CN \
${CHECKER} ./test-c32isblank${EXEEXT} 4
case $? in
0 | 77) ;;
*) exit 1 ;;
esac
fi
exit 0