fnmatch tests: Avoid a test failure on FreeBSD.
authorBruno Haible <bruno@clisp.org>
Sun, 23 Jul 2023 14:49:22 +0000 (16:49 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 23 Jul 2023 14:49:22 +0000 (16:49 +0200)
* tests/test-fnmatch.c (main): In a GB18030 locale, test the towupper()
mapping of 'ö', not of 'ü'.

ChangeLog
tests/test-fnmatch.c

index 14f4b4eda028e83b84a710aabdea9272a639ca57..a1cbfe0638a643ca50ab1ff1734213859aa0bc79 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-07-23  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        fnmatch: Work around bugs on FreeBSD, NetBSD, Solaris, Cygwin, Android.
index 5d5535fda5d71fec7b8a3a14bec921207d057233..b6ffc655390855b6d57c24553c8945ea13e4dc64 100644 (file)
@@ -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);