Hash :
65a73162
Author :
Date :
2023-06-14T01:30:47
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.
Files:
tests/test-nl_langinfo1.sh
tests/test-nl_langinfo2.sh
tests/test-nl_langinfo1.c
tests/test-nl_langinfo2.c
tests/test-nl_langinfo-mt.c
tests/signature.h
tests/macros.h
m4/locale-fr.m4
m4/codeset.m4
m4/intl-thread-locale.m4
m4/musl.m4
Depends-on:
c-strcase
c-strcasestr
setlocale
thread
nanosleep
stdbool
configure.ac:
gt_LOCALE_FR
gt_LOCALE_FR_UTF8
gt_FUNC_USELOCALE
gl_MUSL_LIBC
Makefile.am:
TESTS += test-nl_langinfo1.sh test-nl_langinfo2.sh test-nl_langinfo-mt
TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
check_PROGRAMS += test-nl_langinfo1 test-nl_langinfo2 test-nl_langinfo-mt
test_nl_langinfo1_LDADD = $(LDADD) $(SETLOCALE_LIB)
test_nl_langinfo2_LDADD = $(LDADD) $(SETLOCALE_LIB)
test_nl_langinfo_mt_LDADD = $(LDADD) $(SETLOCALE_LIB) $(LIBMULTITHREAD) $(NANOSLEEP_LIB)