From: Bruno Haible Date: Mon, 29 Jul 2019 01:03:17 +0000 (+0200) Subject: mbrtowc tests: Fix regression on mingw (regression from 2018-02-24). X-Git-Tag: v1.0~4724 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=c8e2eee548e6e81f3fccd31cf9f9a825db7fc8a8;p=gnulib.git mbrtowc tests: Fix regression on mingw (regression from 2018-02-24). * tests/test-mbrtowc.c (main): Fix expected value of wc. --- diff --git a/ChangeLog b/ChangeLog index e38b3c32b1..6443303707 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2019-07-28 Bruno Haible + + 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 pthread-h: Fix definitions of types and macros on mingw. diff --git a/tests/test-mbrtowc.c b/tests/test-mbrtowc.c index 0e01dfa99b..a434fc05ae 100644 --- a/tests/test-mbrtowc.c +++ b/tests/test-mbrtowc.c @@ -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);