mbrtoc32 tests: Avoid failure on Solaris 11.4 (regression yesterday).
authorBruno Haible <bruno@clisp.org>
Fri, 24 May 2024 09:52:46 +0000 (11:52 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 24 May 2024 09:53:17 +0000 (11:53 +0200)
* tests/test-mbrtoc32.c (main): Conditionalize an assertion with
GL_CHAR32_T_IS_UNICODE.

ChangeLog
tests/test-mbrtoc32.c

index bc128db28b8a1be8c995ba9433e1261a05dc32ea..f75872cdbc5912ba9f76ed66390e8948745626d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-05-24  Bruno Haible  <bruno@clisp.org>
+
+       mbrtoc32 tests: Avoid failure on Solaris 11.4 (regression yesterday).
+       * tests/test-mbrtoc32.c (main): Conditionalize an assertion with
+       GL_CHAR32_T_IS_UNICODE.
+
 2024-05-23  Collin Funk  <collin.funk1@gmail.com>
 
        putenv tests: Silence -Wanalyzer-putenv-of-auto-var.
index 68c601e2e511194e99fd1d6da428794913210f58..b1c50c963cdf03aef637b7614140c15f12b46d44 100644 (file)
@@ -315,7 +315,7 @@ main (int argc, char *argv[])
           wc = (char32_t) 0xBADFACE;
           ret = mbrtoc32 (&wc, "\203", 1, &state);
           ASSERT (ret == 1);
-          ASSERT (wc == 0x0001F403);
+          ASSERT (wc == 0x1F403); /* expect Unicode encoding */
           ASSERT (mbsinit (&state));
         }
         return test_exit_status;
@@ -485,7 +485,9 @@ main (int argc, char *argv[])
           wc = (char32_t) 0xBADFACE;
           ret = mbrtoc32 (&wc, "\067", 1, &state);
           ASSERT (ret == 1);
-          ASSERT (wc == 0x0001F403);
+          #if GL_CHAR32_T_IS_UNICODE
+          ASSERT (wc == 0x1F403); /* expect Unicode encoding */
+          #endif
           ASSERT (mbsinit (&state));
         }
         return test_exit_status;