]> Savannah Git Hosting - gnulib.git/commitdiff
mbrtoc32 tests: Prefer *c32* functions.
authorBruno Haible <bruno@clisp.org>
Mon, 3 Apr 2023 12:24:39 +0000 (14:24 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 3 Apr 2023 12:24:39 +0000 (14:24 +0200)
* tests/test-mbrtoc32.c (main): Use btoc32 instead of btowc.
* modules/mbrtoc32-tests (Depends-on): Add btoc32.

ChangeLog
modules/mbrtoc32-tests
tests/test-mbrtoc32.c

index 7bc1a008f1c41f4560cfeb6b099df03e9a00da48..901aa4331aa1d9e80b9cbf383441a2745713c979 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-04-03  Bruno Haible  <bruno@clisp.org>
+
+       mbrtoc32 tests: Prefer *c32* functions.
+       * tests/test-mbrtoc32.c (main): Use btoc32 instead of btowc.
+       * modules/mbrtoc32-tests (Depends-on): Add btoc32.
+
 2023-04-03  Bruno Haible  <bruno@clisp.org>
 
        mbrtoc32 tests: Add comment.
index e123772a20319aaf5cde210bdc084611c4602725..95cc4750bd56510fab6b575504f9759dd80a3234 100644 (file)
@@ -22,6 +22,7 @@ m4/codeset.m4
 
 Depends-on:
 mbsinit
+btoc32
 c32tob
 setlocale
 localcharset
index a40309004ee012ff60f69a5a973510af589cd77a..ecde031f3600ce59fee78e294d7d16ec7562c351 100644 (file)
@@ -397,7 +397,7 @@ main (int argc, char *argv[])
                 else
                   /* On most platforms, the bytes 0x80..0xFF map to U+0080..U+00FF.
                      But on musl libc, the bytes 0x80..0xFF map to U+DF80..U+DFFF.  */
-                  ASSERT (wc == (btowc (c) == 0xDF00 + c ? btowc (c) : c));
+                  ASSERT (wc == (btoc32 (c) == 0xDF00 + c ? btoc32 (c) : c));
                 ASSERT (mbsinit (&state));
 
                 ret = mbrtoc32 (NULL, buf, 1, &state);