bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fnmatch tests: Add many more test cases


From: Bruno Haible
Subject: Re: fnmatch tests: Add many more test cases
Date: Sun, 23 Jul 2023 16:52:54 +0200

I still see a test failure on FreeBSD 13.2, in the zh_CN.GB18030 locale.
The cause is a partial but not complete upper/lower mapping of 'ü' in
this locale, as evidenced by the attached file. This patch fixes it.


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 'ü'.

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);

Attachment: txtfiHmHyRIWq.txt
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]