mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-09-21 08:21:59 +03:00
master
7 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
|
c4bc471be8 |
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. |
||
|
c39d83dd0e |
c32*: Optionally enforce ISO C 23 semantics of char32_t.
* lib/lc-charset-unicode.h: New file. * lib/lc-charset-unicode.c: New file. * modules/uchar-c23: New file. * lib/uchar.in.h (char32_t): Add comment. * lib/mbrtoc32.c: Include lc-charset-unicode.h. (mbrtoc32): If char32_t is Unicode and wchar_t is not, invoke locale_encoding_to_unicode. * lib/btoc32.c: Include lc-charset-unicode.h. (btoc32): If char32_t is Unicode and wchar_t is not, invoke locale_encoding_to_unicode. * lib/c32rtomb.c: Include lc-charset-unicode.h. (c32rtomb): If char32_t is Unicode and wchar_t is not, invoke unicode_to_locale_encoding. * lib/c32tob.c: Include lc-charset-unicode.h. (c32tob): If char32_t is Unicode and wchar_t is not, invoke unicode_to_locale_encoding. * lib/mbsnrtoc32s.c: If char32_t is Unicode and wchar_t is not, don't use mbsnrtowcs. * lib/mbsrtoc32s.c: If char32_t is Unicode and wchar_t is not, don't use mbsrtowcs. * lib/c32snrtombs.c: If char32_t is Unicode and wchar_t is not, don't use wcsnrtombs. * lib/c32srtombs.c: If char32_t is Unicode and wchar_t is not, don't use wcsrtombs. * lib/c32is-impl.h: Include lc-charset-unicode.h. (FUNC): If char32_t is Unicode and wchar_t is not, use UCS_FUNC. * lib/c32to-impl.h: Include lc-charset-unicode.h. (FUNC): If char32_t is Unicode and wchar_t is not, use UCS_FUNC. * lib/c32width.c: Include lc-charset-unicode.h. (c32width): If char32_t is Unicode and wchar_t is not, use uc_width. * tests/test-mbrtoc32.c: Include <wchar.h>. (main): Skip GB18030 tests on NetBSD and Solaris. If GL_CHAR32_T_IS_UNICODE, expect Unicode encoding for the char32_t values. * tests/test-mbrtoc32-w32.c: Include <wchar.h>. (test_one_locale): Simplify. * tests/test-c32rtomb.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32rtomb.sh: Update. * tests/test-mbsnrtoc32s.c: Include <wchar.h>. (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-mbsrtoc32s.c: Include <wchar.h>. (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-mbstoc32s.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32snrtombs.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32srtombs.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32stombs.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32isalnum.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32isalnum.sh: Update. * tests/test-c32isalpha.c (main): Skip GB18030 tests on NetBSD and Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD, Solaris. * tests/test-c32isalpha.sh: Update. * tests/test-c32isblank.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32isblank.sh: Update. * tests/test-c32iscntrl.c (main): Skip GB18030 tests on NetBSD and Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD, Solaris. * tests/test-c32iscntrl.sh: Update. * tests/test-c32isdigit.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32isdigit.sh: Update. * tests/test-c32isgraph.c (main): Skip GB18030 tests on NetBSD and Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD, Solaris. * tests/test-c32isgraph.sh: Update. * tests/test-c32islower.c (main): Skip GB18030 tests on NetBSD and Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD, Solaris. * tests/test-c32islower.sh: Update. * tests/test-c32isprint.c (main): Skip GB18030 tests on NetBSD and Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD, Solaris. * tests/test-c32isprint.sh: Update. * tests/test-c32ispunct.c (main): Skip GB18030 tests on NetBSD and Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD, Solaris. * tests/test-c32ispunct.sh: Update. * tests/test-c32isspace.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32isspace.sh: Update. * tests/test-c32isupper.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32isupper.sh: Update. * tests/test-c32isxdigit.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32isxdigit.sh: Update. * tests/test-c32tolower.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32tolower.sh: Update. * tests/test-c32toupper.c (main): Skip GB18030 tests on NetBSD and Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD, Solaris. * tests/test-c32toupper.sh: Update. * modules/mbrtoc32 (Link): Add $(LIBUNISTRING) $(LIBC32CONV). * modules/mbrtoc32-tests (Makefile.am): Link test-mbrtoc32 with $(LIBUNISTRING) $(LIBC32CONV). * modules/btoc32 (Link): New section. * modules/btoc32-tests (Makefile.am): Link test-btoc32 with $(LIBUNISTRING) $(LIBC32CONV). * modules/c32rtomb (Link): New section. * modules/c32rtomb-tests (Makefile.am): Link test-c32rtomb with $(LIBUNISTRING) $(LIBC32CONV). * modules/c32tob (Link): New section. * modules/mbsnrtoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV). * modules/mbsnrtoc32s-tests (Makefile.am): Link test-mbsnrtoc32s with $(LIBUNISTRING) $(LIBC32CONV). * modules/mbsrtoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV). * modules/mbsrtoc32s-tests (Makefile.am): Link test-mbsrtoc32s with $(LIBUNISTRING) $(LIBC32CONV). * modules/mbstoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV). * modules/mbstoc32s-tests (Makefile.am): Link test-mbstoc32s with $(LIBUNISTRING) $(LIBC32CONV). * modules/c32snrtombs (Link): New section. * modules/c32snrtombs-tests (Makefile.am): Link test-c32snrtombs with $(LIBUNISTRING) $(LIBC32CONV). * modules/c32srtombs (Link): New section. * modules/c32srtombs-tests (Makefile.am): Link test-c32srtombs with $(LIBUNISTRING) $(LIBC32CONV). * modules/c32stombs (Link): New section. * modules/c32stombs-tests (Makefile.am): Link test-c32stombs with $(LIBUNISTRING) $(LIBC32CONV). * modules/c32isalnum (Link): Add $(LIBC32CONV). * modules/c32isalnum-tests (Makefile.am): Link test-c32isalnum with $(LIBC32CONV). * modules/c32isalpha (Link): Add $(LIBC32CONV). * modules/c32isalpha-tests (Makefile.am): Link test-c32isalpha with $(LIBC32CONV). * modules/c32isblank (Link): Add $(LIBC32CONV). * modules/c32isblank-tests (Makefile.am): Link test-c32isblank with $(LIBC32CONV). * modules/c32iscntrl (Link): Add $(LIBC32CONV). * modules/c32iscntrl-tests (Makefile.am): Link test-c32iscntrl with $(LIBC32CONV). * modules/c32isdigit (Link): Add $(LIBC32CONV). * modules/c32isdigit-tests (Makefile.am): Link test-c32isdigit with $(LIBC32CONV). * modules/c32isgraph (Link): Add $(LIBC32CONV). * modules/c32isgraph-tests (Makefile.am): Link test-c32isgraph with $(LIBC32CONV). * modules/c32islower (Link): Add $(LIBC32CONV). * modules/c32islower-tests (Makefile.am): Link test-c32islower with $(LIBC32CONV). * modules/c32isprint (Link): Add $(LIBC32CONV). * modules/c32isprint-tests (Makefile.am): Link test-c32isprint with $(LIBC32CONV). * modules/c32ispunct (Link): Add $(LIBC32CONV). * modules/c32ispunct-tests (Makefile.am): Link test-c32ispunct with $(LIBC32CONV). * modules/c32isspace (Link): Add $(LIBC32CONV). * modules/c32isspace-tests (Makefile.am): Link test-c32isspace with $(LIBC32CONV). * modules/c32isupper (Link): Add $(LIBC32CONV). * modules/c32isupper-tests (Makefile.am): Link test-c32isupper with $(LIBC32CONV). * modules/c32isxdigit (Link): Add $(LIBC32CONV). * modules/c32isxdigit-tests (Makefile.am): Link test-c32isxdigit with $(LIBC32CONV). * modules/c32tolower (Link): Add $(LIBC32CONV). * modules/c32tolower-tests (Makefile.am): Link test-c32tolower with $(LIBC32CONV). * modules/c32toupper (Link): Add $(LIBC32CONV). * modules/c32toupper-tests (Makefile.am): Link test-c32toupper with $(LIBC32CONV). * modules/c32width (Link): Add $(LIBC32CONV). * modules/c32width-tests (Makefile.am): Link test-c32width with $(LIBC32CONV). * modules/c32swidth (Link): Add $(LIBC32CONV). * modules/c32swidth-tests (Makefile.am): Link test-c32swidth with $(LIBC32CONV). * modules/mbchar (Link): Add $(LIBC32CONV). * modules/mbiter (Link): Add $(LIBC32CONV). * modules/mbuiter (Link): Add $(LIBC32CONV). * modules/mbfile (Link): Add $(LIBC32CONV). * modules/mbmemcasecmp (Link): Add $(LIBC32CONV). * modules/mbmemcasecmp-tests (Makefile.am): Link test-mbmemcasecmp with $(LIBC32CONV). * modules/mbscasecmp (Link): Add $(LIBC32CONV). * modules/mbscasecmp-tests (Makefile.am): Link test-mbscasecmp with $(LIBC32CONV). * modules/mbscasestr (Link): Add $(LIBC32CONV). * modules/mbscasestr-tests (Makefile.am): Link test-mbscasestr1, test-mbscasestr2, test-mbscasestr3, test-mbscasestr4 with $(LIBC32CONV). * modules/mbschr (Link): Add $(LIBC32CONV). * modules/mbschr-tests (Makefile.am): Link test-mbschr with $(LIBC32CONV). * modules/mbscspn (Link): Add $(LIBC32CONV). * modules/mbscspn-tests (Makefile.am): Link test-mbscspn with $(LIBC32CONV). * modules/mbslen (Link): Add $(LIBC32CONV). * modules/mbsncasecmp (Link): Add $(LIBC32CONV). * modules/mbsncasecmp-tests (Makefile.am): Link test-mbsncasecmp with $(LIBC32CONV). * modules/mbsnlen (Link): Add $(LIBC32CONV). * modules/mbspbrk (Link): Add $(LIBC32CONV). * modules/mbspbrk-tests (Makefile.am): Link test-mbspbrk with $(LIBC32CONV). * modules/mbspcasecmp (Link): Add $(LIBC32CONV). * modules/mbspcasecmp-tests (Makefile.am): Link test-mbspcasecmp with $(LIBC32CONV). * modules/mbsrchr (Link): Add $(LIBC32CONV). * modules/mbsrchr-tests (Makefile.am): Link test-mbsrchr with $(LIBC32CONV). * modules/mbssep (Link): Add $(LIBC32CONV). * modules/mbsspn (Link): Add $(LIBC32CONV). * modules/mbsspn-tests (Makefile.am): Link test-mbsspn with $(LIBC32CONV). * modules/mbsstr (Link): Add $(LIBC32CONV). * modules/mbsstr-tests (Makefile.am): Link test-mbsstr1, test-mbsstr2, test-mbsstr3 with $(LIBC32CONV). * modules/mbstok_r (Link): Add $(LIBC32CONV). * modules/propername (Link): Add $(LIBC32CONV). * modules/regex-quote (Link): Add $(LIBC32CONV). * modules/regex-quote-tests (Makefile.am): Link test-regex-quote with $(LIBC32CONV). * modules/trim (Link): Add $(LIBC32CONV). * modules/trim-tests (Makefile.am): Link test-trim with $(LIBC32CONV). * modules/exclude (Link): Add $(LIBC32CONV). * modules/exclude-tests (Makefile.am): Link test-exclude with $(LIBC32CONV). * doc/posix-headers/uchar.texi: Mention the uchar-c23 module. * doc/posix-functions/mbrtoc32.texi: Likewise. * doc/strings.texi (The char32_t type): Likewise. |
||
|
65a73162a5 |
Make internationalization tests stricter on musl systems.
* m4/locale-fr.m4 (gt_LOCALE_FR): On musl systems, set LOCALE_FR_UTF8 to "fr_FR.UTF-8" instead of "none". Set and substitute LC_COLLATE_IMPLEMENTED, LC_NUMERIC_IMPLEMENTED, LC_TIME_IMPLEMENTED, LC_MONETARY_IMPLEMENTED. * m4/iswdigit.m4 (gl_FUNC_ISWDIGIT): Skip testing a certain locale if that locale is "none". * m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Likewise. * m4/mbrlen.m4 (gl_MBRLEN_RETVAL): Likewise. * m4/mbrtowc.m4 (gl_MBRTOWC_RETVAL): Likewise. * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Likewise. * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise. * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise. -- * tests/test-c32isalpha.c (main): On musl libc, disable tests that fail. * tests/test-c32iscntrl.c (main): Likewise. * tests/test-c32isgraph.c (main): Likewise. * tests/test-c32islower.c (main): Likewise. * tests/test-c32isprint.c (main): Likewise. * tests/test-c32toupper.c (main): Likewise. * tests/test-nl_langinfo1.c (main): Likewise. * tests/test-nl_langinfo2.c (main): Likewise. * modules/c32isalpha-tests (Files): Add musl.m4. (configure.ac): Invoke gl_MUSL_LIBC. * modules/c32iscntrl-tests (Files): Add musl.m4. (configure.ac): Invoke gl_MUSL_LIBC. * modules/c32isgraph-tests (Files): Add musl.m4. (configure.ac): Invoke gl_MUSL_LIBC. * modules/c32islower-tests (Files): Add musl.m4. (configure.ac): Invoke gl_MUSL_LIBC. * modules/c32isprint-tests (Files): Add musl.m4. (configure.ac): Invoke gl_MUSL_LIBC. * modules/c32toupper-tests (Files): Add musl.m4. (configure.ac): Invoke gl_MUSL_LIBC. * modules/nl_langinfo-tests (Files): Add musl.m4. (configure.ac): Invoke gl_MUSL_LIBC. -- * tests/test-strtod1.sh: Skip the test if LC_NUMERIC_IMPLEMENTED is false. * tests/test-strtold1.sh: Likewise. * tests/test-vasnprintf-posix2.sh: Likewise. * tests/test-vasnwprintf-posix2.sh: Likewise. * modules/strtod-tests (Makefile.am): Set LC_NUMERIC_IMPLEMENTED in the tests environment. * modules/strtold-tests (Makefile.am): Likewise. * modules/vasnprintf-posix-tests (Makefile.am): Likewise. * modules/vasnwprintf-posix-tests (Makefile.am): Likewise. |
||
|
bd50da7f20 |
setlocale: Rename LIB_SETLOCALE to SETLOCALE_LIB.
* m4/setlocale.m4: Rename LIB_SETLOCALE to SETLOCALE_LIB. All uses changed. * NEWS: Mention the change. |
||
|
c50044d684 |
mbrtowc: Rename LIB_MBRTOWC to MBRTOWC_LIB.
* m4/mbrtowc.m4: Rename LIB_MBRTOWC to MBRTOWC_LIB. All uses changed. * NEWS: Mention the change. |
||
|
16a84f2d70 |
Fix link errors on platforms with libunistring.
* modules/c32isalnum (Link): New section. * modules/c32isalnum-tests (Makefile.am): Link test-c32isalnum with $(LIBUNISTRING). * modules/c32isalpha (Link): New section. * modules/c32isalpha-tests (Makefile.am): Link test-c32isalpha with $(LIBUNISTRING). * modules/c32isblank (Link): New section. * modules/c32isblank-tests (Makefile.am): Link test-c32isblank with $(LIBUNISTRING). * modules/c32iscntrl (Link): New section. * modules/c32iscntrl-tests (Makefile.am): Link test-c32iscntrl with $(LIBUNISTRING). * modules/c32isdigit (Link): New section. * modules/c32isdigit-tests (Makefile.am): Link test-c32isdigit with $(LIBUNISTRING). * modules/c32isgraph (Link): New section. * modules/c32isgraph-tests (Makefile.am): Link test-c32isgraph with $(LIBUNISTRING). * modules/c32islower (Link): New section. * modules/c32islower-tests (Makefile.am): Link test-c32islower with $(LIBUNISTRING). * modules/c32isprint (Link): New section. * modules/c32isprint-tests (Makefile.am): Link test-c32isprint with $(LIBUNISTRING). * modules/c32ispunct (Link): New section. * modules/c32ispunct-tests (Makefile.am): Link test-c32ispunct with $(LIBUNISTRING). * modules/c32isspace (Link): New section. * modules/c32isspace-tests (Makefile.am): Link test-c32isspace with $(LIBUNISTRING). * modules/c32isupper (Link): New section. * modules/c32isupper-tests (Makefile.am): Link test-c32isupper with $(LIBUNISTRING). * modules/c32isxdigit (Link): New section. * modules/c32isxdigit-tests (Makefile.am): Link test-c32isxdigit with $(LIBUNISTRING). * modules/unicodeio (Link): Mention $(LIBUNISTRING). * modules/unicodeio-tests (Makefile.am): Link test-unicodeio with $(LIBUNISTRING). |
||
|
3e3e81eb05 |
c32islower: Add tests.
* tests/test-c32islower.c: New file. * tests/test-c32islower.sh: New file. * modules/c32islower-tests: New file. |