mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2026-10-24 00:48:56 +03:00
* lib/mbuiterf.h: Include mbiter-aux.h. (struct mbuif_state): Add field is_utf8. (mbuiterf_next): Invoke mbiter_is_utf8, mbiter_utf8_maximal_subpart. (mbuif_init): Initialize the field is_utf8. * modules/mbuiterf (Depends-on): Add mbiter-aux. * tests/test-mbslen.c (OR): New macro, copied from tests/test-mbsnlen.c. (main): Add more test cases with incomplete characters. * tests/test-mbschr2.sh: Renamed from tests/test-mbschr.sh. * tests/test-mbschr2.c: Renamed from tests/test-mbschr.c. * tests/test-mbschr1.sh: New file, based on tests/test-mbmemcasecmp-3.sh. * tests/test-mbschr1.c: New file. * modules/mbschr-tests (Files): Update accordingly. Add locale-en.m4, locale-fr.m4. (configure.ac): Invoke gt_LOCALE_EN_UTF8, gt_LOCALE_FR_UTF8. (Makefile.am): Arrange to compile test-mbschr1 and test-mbschr2 and to run test-mbschr1.sh, test-mbschr2.sh. * tests/test-mbsrchr2.sh: Renamed from tests/test-mbsrchr.sh. * tests/test-mbsrchr2.c: Renamed from tests/test-mbsrchr.c. * tests/test-mbsrchr1.sh: New file, based on tests/test-mbmemcasecmp-3.sh. * tests/test-mbsrchr1.c: New file. * modules/mbsrchr-tests (Files): Update accordingly. Add locale-en.m4, locale-fr.m4. (configure.ac): Invoke gt_LOCALE_EN_UTF8, gt_LOCALE_FR_UTF8. (Makefile.am): Arrange to compile test-mbsrchr1 and test-mbsrchr2 and to run test-mbsrchr1.sh, test-mbsrchr2.sh. * tests/test-mbscspn.c (OR): New macro, copied from tests/test-mbsnlen.c. (main): Add test cases with incomplete characters. * tests/test-mbspbrk.c (OR): New macro, copied from tests/test-mbsnlen.c. (main): Add test cases with incomplete characters. * tests/test-mbsspn.c (OR): New macro, copied from tests/test-mbsnlen.c. (main): Add test cases with incomplete characters.
24 lines
635 B
Bash
Executable File
24 lines
635 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# 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
|
|
if test -f /usr/bin/localedef; then
|
|
echo "Skipping test: no english or french Unicode locale is installed"
|
|
else
|
|
echo "Skipping test: no english or french Unicode locale is supported"
|
|
fi
|
|
exit 77
|
|
fi
|
|
|
|
# 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-mbsrchr1${EXEEXT}
|