From: Bruno Haible Date: Sun, 23 Jul 2023 14:49:22 +0000 (+0200) Subject: fnmatch tests: Avoid a test failure on FreeBSD. X-Git-Tag: v1.0~1044 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4e7e7fe4e9fcd9915fd457aac4aab3a1ab70ae82;p=thirdparty%2Fgnulib.git fnmatch tests: Avoid a test failure on FreeBSD. * tests/test-fnmatch.c (main): In a GB18030 locale, test the towupper() mapping of 'ö', not of 'ü'. --- diff --git a/ChangeLog b/ChangeLog index 14f4b4eda0..a1cbfe0638 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-07-23 Bruno Haible + + fnmatch tests: Avoid a test failure on FreeBSD. + * tests/test-fnmatch.c (main): In a GB18030 locale, test the towupper() + mapping of 'ö', not of 'ü'. + 2023-07-23 Bruno Haible fnmatch: Work around bugs on FreeBSD, NetBSD, Solaris, Cygwin, Android. diff --git a/tests/test-fnmatch.c b/tests/test-fnmatch.c index 5d5535fda5..b6ffc65539 100644 --- a/tests/test-fnmatch.c +++ b/tests/test-fnmatch.c @@ -941,7 +941,7 @@ main (int argc, char *argv[]) mbstate_t state; wchar_t wc; memset (&state, 0, sizeof (mbstate_t)); - if (mbrtowc (&wc, "\250\271", 2, &state) == 2 + if (mbrtowc (&wc, "\201\060\213\062", 4, &state) == 4 && towupper (wc) != wc) { ASSERT (fnmatch ("\201\060\213\062zg\250\271r", "\201\060\211\060ZG\201\060\211\065R", FNM_CASEFOLD) == 0);