]> Savannah Git Hosting - gnulib.git/commitdiff
mbrtowc tests: Fix regression on mingw (regression from 2018-02-24).
authorBruno Haible <bruno@clisp.org>
Mon, 29 Jul 2019 01:03:17 +0000 (03:03 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 29 Jul 2019 01:03:17 +0000 (03:03 +0200)
* tests/test-mbrtowc.c (main): Fix expected value of wc.

ChangeLog
tests/test-mbrtowc.c

index e38b3c32b1f927f116bfb8dbc85e9c412809e36f..644330370700fd7f4517a95ed1fc0cb13cf0b691 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-07-28  Bruno Haible  <bruno@clisp.org>
+
+       mbrtowc tests: Fix regression on mingw (regression from 2018-02-24).
+       * tests/test-mbrtowc.c (main): Fix expected value of wc.
+
 2019-07-24  Bruno Haible  <bruno@clisp.org>
 
        pthread-h: Fix definitions of types and macros on mingw.
index 0e01dfa99b554c7590c04fbdb8f3a87269fe41ca..a434fc05aef665e7ff497d0a43b18f2f04ec16a7 100644 (file)
@@ -111,7 +111,7 @@ main (int argc, char *argv[])
                locale.
                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) == WEOF ? c : btowc (c)));
+            ASSERT (wc == (btowc (c) == 0xDF00 + c ? btowc (c) : c));
           ASSERT (mbsinit (&state));
           ret = mbrtowc (NULL, buf, 1, &state);
           ASSERT (ret == 1);