openat: don’t close (-1)
[gnulib.git] / tests / test-c32toupper.sh
blob6797bd2d5f762a4a7802e44f222672eb5bef916f
1 #!/bin/sh
3 # Allow distinguishing the various invocations in the .log file.
4 set -x
6 # Test in the POSIX locale.
7 LC_ALL=C ${CHECKER} ./test-c32toupper${EXEEXT} 0 || exit 1
8 LC_ALL=POSIX ${CHECKER} ./test-c32toupper${EXEEXT} 0 || exit 1
10 # Test in an ISO-8859-1 or ISO-8859-15 locale.
11 : "${LOCALE_FR=fr_FR}"
12 if test $LOCALE_FR != none; then
13 LC_ALL=$LOCALE_FR \
14 ${CHECKER} ./test-c32toupper${EXEEXT} 1 \
15 || exit 1
18 # Test whether a specific EUC-JP locale is installed.
19 : "${LOCALE_JA=ja_JP}"
20 if test $LOCALE_JA != none; then
21 LC_ALL=$LOCALE_JA \
22 ${CHECKER} ./test-c32toupper${EXEEXT} 2 \
23 || exit 1
26 # Test whether a specific UTF-8 locale is installed.
27 : "${LOCALE_EN_UTF8=en_US.UTF-8}"
28 : "${LOCALE_FR_UTF8=fr_FR.UTF-8}"
29 if test "$LOCALE_EN_UTF8" != none || test $LOCALE_FR_UTF8 != none; then
30 # It's sufficient to test in one of the two locales.
31 if test $LOCALE_FR_UTF8 != none; then
32 testlocale=$LOCALE_FR_UTF8
33 else
34 testlocale="$LOCALE_EN_UTF8"
36 LC_ALL="$testlocale" \
37 ${CHECKER} ./test-c32toupper${EXEEXT} 3 \
38 || exit 1
41 # Test whether a specific GB18030 locale is installed.
42 : "${LOCALE_ZH_CN=zh_CN.GB18030}"
43 if test $LOCALE_ZH_CN != none; then
44 LC_ALL=$LOCALE_ZH_CN \
45 ${CHECKER} ./test-c32toupper${EXEEXT} 4
46 case $? in
47 0 | 77) ;;
48 *) exit 1 ;;
49 esac
52 exit 0